Skip to content

Commit

Permalink
Do not pass user defines when in manual mode. Closes #602
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgelenas committed Jun 19, 2024
1 parent 8fb8ec1 commit 7ce7725
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import UserDefineKey from '../../../library/FirmwareBuilder/Enum/UserDefineKey';
import { NoOpFunc, OnOutputFunc } from '../../../library/Commander';
import Python from '../../../library/Python';
import { LoggerService } from '../../../logger';
import UserDefinesMode from '../../../models/enum/UserDefinesMode';

const maskSensitiveFlags = (data: string[][]): string[][] => {
const sensitiveData = ['--phrase', '--ssid', '--password'];
Expand Down Expand Up @@ -55,7 +56,10 @@ export default class BinaryConfigurator {
if (subType.toLocaleLowerCase().includes('tx_')) {
flags.push(['--tx']);
}
flags.push(...this.userDefinesToFlags(params.userDefines));

if (params.userDefinesMode === UserDefinesMode.UserInterface) {
flags.push(...this.userDefinesToFlags(params.userDefines));
}

if (params.forceFlash) {
flags.push(['--force']);
Expand Down

1 comment on commit 7ce7725

@davetheghost
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't line 141-142 need a flags.push ?

Please sign in to comment.