diff --git a/src/features/runner.ts b/src/features/runner.ts index 58c0cab45..feddd42f1 100644 --- a/src/features/runner.ts +++ b/src/features/runner.ts @@ -144,7 +144,8 @@ export class AnsiblePlaybookRunProvider { ); return; } - commandLineArgs.push(playbookFsPath); + // replace spaces in file name with escape sequence '\ ' + commandLineArgs.push(playbookFsPath.replace(/(\s)/, "\\ ")); const cmdArgs = commandLineArgs.map((arg) => arg).join(" "); const [command, runEnv] = withInterpreter( this.settings,