Skip to content

Commit

Permalink
Rename temp local cli path to avoid clashes (devcontainers#177)
Browse files Browse the repository at this point in the history
* Rename temp local cli path to avoid clashes

Change the name for the path used to embed the CLI for dev/test purposes
to reduce the chance of conflicts with paths in user repos

* Be explicit about root user
  • Loading branch information
stuartleeks authored Oct 28, 2022
1 parent c591d20 commit 3dcee0e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions azdo-task/DevcontainersCi/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16930,13 +16930,13 @@ function installCli(exec) {
// if we have a local 'cli' folder, then use that as we're testing a private cli build
let cliStat = null;
try {
cliStat = yield fstat('./cli');
cliStat = yield fstat('./_devcontainer_cli');
}
catch (_a) {
}
if (cliStat && cliStat.isDirectory()) {
console.log('** Installing local cli');
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'cd cli && npm install && npm install -g'], {});
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'cd _devcontainer_cli && npm install && npm install -g'], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevcontainersCi/dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/src/dev-container-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ async function installCli(exec: ExecFunction): Promise<boolean> {
// if we have a local 'cli' folder, then use that as we're testing a private cli build
let cliStat = null;
try {
cliStat = await fstat('./cli');
cliStat = await fstat('./_devcontainer_cli');
} catch {
}
if (cliStat && cliStat.isDirectory()) {
console.log('** Installing local cli');
const {exitCode, stdout, stderr} = await exec('bash', ['-c', 'cd cli && npm install && npm install -g'], {});
const {exitCode, stdout, stderr} = await exec('bash', ['-c', 'cd _devcontainer_cli && npm install && npm install -g'], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
4 changes: 2 additions & 2 deletions common_lib/dev-container-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ function installCli(exec) {
// if we have a local 'cli' folder, then use that as we're testing a private cli build
let cliStat = null;
try {
cliStat = yield fstat('./cli');
cliStat = yield fstat('./_devcontainer_cli');
}
catch (_a) {
}
if (cliStat && cliStat.isDirectory()) {
console.log('** Installing local cli');
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'cd cli && npm install && npm install -g'], {});
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'cd _devcontainer_cli && npm install && npm install -g'], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
4 changes: 2 additions & 2 deletions github-action/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion github-action/dist/index.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./scripts/go-tools.sh",

// "remoteUser": "vscode",
"remoteUser": "root",

"extensions": [
"golang.go",
Expand Down

0 comments on commit 3dcee0e

Please sign in to comment.