mirror of
https://github.com/DeLaGuardo/setup-clojure.git
synced 2024-12-27 00:16:21 +08:00
Pass PATH and JAVA_CMD when exec'ing the setup scripts
This commit is contained in:
parent
38cb63c34a
commit
4a2f78e98e
19
dist/index.js
vendored
19
dist/index.js
vendored
@ -1561,6 +1561,12 @@ function installBoot(binScript, destinationFolder, version) {
|
||||
BOOT_VERSION: version
|
||||
};
|
||||
}
|
||||
if (process.env['PATH']) {
|
||||
env['PATH'] = process.env['PATH'];
|
||||
}
|
||||
if (process.env['JAVA_CMD']) {
|
||||
env['JAVA_CMD'] = process.env['JAVA_CMD'];
|
||||
}
|
||||
yield exec.exec(`./boot ${version === 'latest' ? '-u' : '-V'}`, [], {
|
||||
cwd: path.join(destinationFolder, 'boot', 'bin'),
|
||||
env
|
||||
@ -3372,11 +3378,18 @@ function installLeiningen(binScript, destinationFolder) {
|
||||
const version_cmd = IS_WINDOWS
|
||||
? 'powershell .\\lein.ps1 self-install'
|
||||
: './lein version';
|
||||
let env = {
|
||||
LEIN_HOME: path.join(destinationFolder, 'leiningen'),
|
||||
};
|
||||
if (process.env['PATH']) {
|
||||
env['PATH'] = process.env['PATH'];
|
||||
}
|
||||
if (process.env['JAVA_CMD']) {
|
||||
env['JAVA_CMD'] = process.env['JAVA_CMD'];
|
||||
}
|
||||
yield exec.exec(version_cmd, [], {
|
||||
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
||||
env: {
|
||||
LEIN_HOME: path.join(destinationFolder, 'leiningen')
|
||||
}
|
||||
env: env
|
||||
});
|
||||
return path.join(destinationFolder, 'leiningen');
|
||||
}
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -74,7 +74,7 @@ async function installBoot(
|
||||
await io.mv(bin, path.join(binDir, `boot`))
|
||||
fs.chmodSync(path.join(binDir, `boot`), '0755')
|
||||
|
||||
let env = {}
|
||||
let env: {[key: string]: string} = {};
|
||||
if (version === 'latest') {
|
||||
env = {
|
||||
BOOT_HOME: path.join(destinationFolder, 'boot')
|
||||
@ -86,6 +86,13 @@ async function installBoot(
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env['PATH']) {
|
||||
env['PATH'] = process.env['PATH']
|
||||
}
|
||||
if (process.env['JAVA_CMD']) {
|
||||
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
||||
}
|
||||
|
||||
await exec.exec(`./boot ${version === 'latest' ? '-u' : '-V'}`, [], {
|
||||
cwd: path.join(destinationFolder, 'boot', 'bin'),
|
||||
env
|
||||
|
@ -65,11 +65,20 @@ async function installLeiningen(
|
||||
? 'powershell .\\lein.ps1 self-install'
|
||||
: './lein version'
|
||||
|
||||
let env: {[key: string]: string} = {
|
||||
LEIN_HOME: path.join(destinationFolder, 'leiningen'),
|
||||
}
|
||||
|
||||
if (process.env['PATH']) {
|
||||
env['PATH'] = process.env['PATH']
|
||||
}
|
||||
if (process.env['JAVA_CMD']) {
|
||||
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
||||
}
|
||||
|
||||
await exec.exec(version_cmd, [], {
|
||||
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
||||
env: {
|
||||
LEIN_HOME: path.join(destinationFolder, 'leiningen')
|
||||
}
|
||||
env: env
|
||||
})
|
||||
|
||||
return path.join(destinationFolder, 'leiningen')
|
||||
|
Loading…
x
Reference in New Issue
Block a user