From c4a77a021bf1c10094008dfd1912f5f3b0b74437 Mon Sep 17 00:00:00 2001 From: Priyam Sahoo <42550351+priyamsahoo@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:49:07 +0530 Subject: [PATCH] Fix command runner (#949) --- examples/with_double_ext.ansible.yml | 2 +- src/features/utils/commandRunner.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/with_double_ext.ansible.yml b/examples/with_double_ext.ansible.yml index 03f5d78a0..b69be0e38 100644 --- a/examples/with_double_ext.ansible.yml +++ b/examples/with_double_ext.ansible.yml @@ -1,4 +1,4 @@ -- hosts: all +- hosts: localhost tasks: - name: This file is using double extension and the language is set by it ansible.builtin.debug: diff --git a/src/features/utils/commandRunner.ts b/src/features/utils/commandRunner.ts index b19fa07c9..1b1d6ef9e 100644 --- a/src/features/utils/commandRunner.ts +++ b/src/features/utils/commandRunner.ts @@ -38,10 +38,8 @@ export function withInterpreter( const pathEntry = path.join(virtualEnv, "bin"); if (path.isAbsolute(runExecutable)) { - // if both interpreter path and absolute command path are provided, we can - // bolster the chances of success by letting the interpreter execute the - // command - command = `${interpreterPath} ${runExecutable} ${cmdArgs}`; + // if the user provided a path to the executable, we directly execute the app. + command = `${runExecutable} ${cmdArgs}`; } // emulating virtual environment activation script newEnv["VIRTUAL_ENV"] = virtualEnv;