Skip to content

Commit

Permalink
Sanitize pat when displaying args for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinMcNeil committed Dec 17, 2024
1 parent 3c6ab1a commit 9b38e38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/promptRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export const getRunArgs = async (promptRef: string, projectDir: string, username

export const spawnPromptImage = async (promptArg: string, projectDir: string, username: string, platform: string, pat: string, callback: (json: any) => Promise<void>, token: CancellationToken) => {
const args = await getRunArgs(promptArg!, projectDir!, username, platform, pat);
callback({ method: 'message', params: { debug: `Running ${args.join(' ')}` } });
const argsString = args.join(' ').replace(/dckr_pat_.*$/g, 'dckr_pat_****');
callback({ method: 'message', params: { debug: `Running ${argsString}` } });
const childProcess = spawn("docker", args);
const pid = childProcess.pid;

Expand Down

0 comments on commit 9b38e38

Please sign in to comment.