Skip to content

Commit

Permalink
Merge pull request #352 from raffy8361/feat/dynamic_path
Browse files Browse the repository at this point in the history
feat: have %USERNAME% be usable for python path
  • Loading branch information
twibiral authored May 30, 2024
2 parents 5726c1b + 4b3d8e7 commit 43f93b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/executors/ReplExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default abstract class ReplExecutor extends AsyncExecutor {
path = "wsl";
}

// Replace %USERNAME% with actual username
path = path.replace("%USERNAME%", process.env.USERNAME);

// Spawns a new REPL that is used to execute code.
// {env: process.env} is used to ensure that the environment variables are passed to the REPL.
this.process = spawn(path, args, {env: process.env});
Expand Down

0 comments on commit 43f93b1

Please sign in to comment.