Skip to content

Commit

Permalink
fixup: bios pwd support for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexVinarskis committed Feb 18, 2024
1 parent 8a58d3b commit 728ae32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/classes/api_cctk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@ class ApiCCTK {

static Future<bool> request(String cctkType, String mode) async {
/* Query, process, and respond */
ProcessResult pr = await _runCctk('--$cctkType=$mode${Environment.biosPwd == null ? "" : " --ValSetupPwd=\$${Constants.varnameBiosPwd} --ValSysPwd=\$${Constants.varnameBiosPwd}"}');
late String cmd;
if (Platform.isLinux) {
cmd = '--$cctkType=$mode${Environment.biosPwd == null ? "" : " --ValSetupPwd=\$${Constants.varnameBiosPwd} --ValSysPwd=\$${Constants.varnameBiosPwd}"}';
} else {
cmd = '--$cctkType=$mode${Environment.biosPwd == null ? "" : " --ValSetupPwd=%${Constants.varnameBiosPwd}% --ValSysPwd=%${Constants.varnameBiosPwd}%"}';
}
ProcessResult pr = await _runCctk(cmd);
bool success = _processResponse(pr);
cctkState.exitStateWrite = ExitState(pr.exitCode, cctkType, mode);
_callStateChanged(cctkState);
Expand Down

0 comments on commit 728ae32

Please sign in to comment.