Skip to content

Commit

Permalink
Don't use shell and always use deps.clj on windows
Browse files Browse the repository at this point in the history
* Fixes #2592
  • Loading branch information
PEZ committed Jul 3, 2024
1 parent e284cf2 commit 90e8458
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/nrepl/project-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ function depsCljWindowsPath() {
}

const clojureCmdFn = () => {
const q = isWin ? '"' : "'";
const configuredCmd =
getConfig().depsEdnJackInExecutable === 'clojure or deps.clj'
? getStateValue('depsEdnJackInDefaultExecutable') ?? 'deps.clj'
Expand All @@ -339,6 +338,10 @@ const clojureCmdFn = () => {
: ['clojure'];
};

const clojureCmdWinFn = () => {
return ['java', '-jar', `${path.join(state.extensionContext.extensionPath, 'deps.clj.jar')}`];
};

const projectTypes: { [id: string]: ProjectType } = {
lein: {
name: 'Leiningen',
Expand Down Expand Up @@ -375,10 +378,10 @@ const projectTypes: { [id: string]: ProjectType } = {
'ClojureScript built-in for node',
],
cmd: clojureCmdFn,
winCmd: clojureCmdFn,
winCmd: clojureCmdWinFn,
resolveBundledPathWin: depsCljWindowsPath,
processShellUnix: true,
processShellWin: true,
processShellWin: false,
useWhenExists: ['deps.edn'],
nReplPortFile: ['.nrepl-port'],
/** Build the command line args for a clj-project.
Expand Down Expand Up @@ -669,7 +672,7 @@ async function cljCommandLine(connectSequence: ReplConnectSequence, cljsType: Cl
const aliasesOption =
aliases.length > 0 ? `${aliasesFlag[0]}${aliases.join('')}` : aliasesFlag[1];
const q = isWin ? '"' : "'";
const dQ = isWin ? '""' : '"';
const dQ = isWin ? '\\"' : '"';
for (const dep in dependencies) {
out.push(dep + ` {:mvn/version,${dQ}${dependencies[dep]}${dQ}}`);
}
Expand Down

0 comments on commit 90e8458

Please sign in to comment.