fix: enable adding paths using commands outside of the ci

enable ACTIONS_ALLOW_UNSECURE_COMMANDS inside docker build
This commit is contained in:
Amin Yahyaabadi 2021-09-18 07:20:18 -05:00
parent 577e455c62
commit a4f327ad7e
6 changed files with 9 additions and 3 deletions

View File

@ -114,3 +114,5 @@ jobs:
id: docker_build
run: |
pnpm build.docker
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@
"test.unit": "jest --runInBand",
"test": "run-p test.format test.lint test.tsc test.unit",
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./building/scripts/pack-exe.js",
"build.docker": "pnpm build && docker build -f ./building/docker/node.docker -t setup_cpp .",
"build.docker": "pnpm build && docker build -f ./building/docker/node.dockerfile -t setup_cpp .",
"start.docker": "docker run -t setup_cpp ."
},
"engines": {

View File

@ -69,6 +69,10 @@ const inputs: Array<Inputs> = ["compiler", "architecture", ...tools]
export async function main(args: string[]): Promise<number> {
const isCI = Boolean(process.env.CI)
if (!isCI) {
process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = "true"
}
// parse options using mri or github actions
const opts = mri<Record<Inputs, string | undefined> & { help: boolean }>(args, {
string: inputs,