fix: add install root to path
This commit is contained in:
parent
eb33d5551a
commit
c7dcf0a98b
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@ -26,6 +26,11 @@ jobs:
|
|||||||
- name: Test Deno
|
- name: Test Deno
|
||||||
run: deno run https://deno.land/std/examples/welcome.ts
|
run: deno run https://deno.land/std/examples/welcome.ts
|
||||||
|
|
||||||
|
- name: Test `deno install`
|
||||||
|
run: |
|
||||||
|
deno install --allow-net -n deno_curl https://deno.land/std/examples/curl.ts
|
||||||
|
deno_curl https://deno.land/std/examples/curl.ts
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
if: runner.os == 'Linux' && matrix.deno == 'canary'
|
if: runner.os == 'Linux' && matrix.deno == 'canary'
|
||||||
run: npm run fmt:check
|
run: npm run fmt:check
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
const os = require("os");
|
||||||
|
const path = require("path");
|
||||||
const process = require("process");
|
const process = require("process");
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const tc = require("@actions/tool-cache");
|
const tc = require("@actions/tool-cache");
|
||||||
@ -31,8 +33,11 @@ async function install(version) {
|
|||||||
"deno",
|
"deno",
|
||||||
version.isCanary ? `0.0.0-${version.version}` : version.version,
|
version.isCanary ? `0.0.0-${version.version}` : version.version,
|
||||||
);
|
);
|
||||||
core.info(`Cached Deno to ${newCachedPath}.`);
|
|
||||||
core.addPath(newCachedPath);
|
core.addPath(newCachedPath);
|
||||||
|
core.info(`Cached Deno to ${newCachedPath}.`);
|
||||||
|
const denoInstallRoot = process.env.DENO_INSTALL_ROOT ||
|
||||||
|
path.join(os.homedir(), ".deno", "bin");
|
||||||
|
core.addPath(denoInstallRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {string} */
|
/** @returns {string} */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user