Skip to content

Commit

Permalink
Fix command runner (#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyamsahoo authored Jul 26, 2023
1 parent f7972a7 commit c4a77a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/with_double_ext.ansible.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 2 additions & 4 deletions src/features/utils/commandRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c4a77a0

Please sign in to comment.