fix(node): use shorter run-commands options for docker-build (#15224)

This commit is contained in:
Jack Hsu 2023-02-24 09:16:55 -05:00 committed by GitHub
parent b488f6483a
commit c08823abb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -25,7 +25,7 @@ describe('setupDockerGenerator', () => {
dependsOn: ['build'],
executor: 'nx:run-commands',
options: {
commands: ['docker build -f api/Dockerfile . -t api'],
command: 'docker build -f api/Dockerfile . -t api',
},
},
})
@ -50,7 +50,7 @@ describe('setupDockerGenerator', () => {
dependsOn: ['build'],
executor: 'nx:run-commands',
options: {
commands: ['docker build -f Dockerfile . -t api'],
command: 'docker build -f Dockerfile . -t api',
},
},
})

View File

@ -55,12 +55,10 @@ export function updateProjectConfig(tree: Tree, options: SetUpDockerOptions) {
dependsOn: [`${options.buildTarget}`],
executor: 'nx:run-commands',
options: {
commands: [
`docker build -f ${joinPathFragments(
projectConfig.root,
'Dockerfile'
)} . -t ${options.project}`,
],
command: `docker build -f ${joinPathFragments(
projectConfig.root,
'Dockerfile'
)} . -t ${options.project}`,
},
};