File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
apps/generator-cli/src/app/services Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import * as path from 'path';
6
6
import * as fs from 'fs-extra' ;
7
7
import * as glob from 'glob' ;
8
8
import * as chalk from 'chalk' ;
9
+ import * as os from 'os' ;
9
10
import { VersionManagerService } from './version-manager.service' ;
10
11
import { ConfigService } from './config.service' ;
11
12
import { LOGGER } from '../constants' ;
@@ -173,9 +174,12 @@ export class GeneratorService {
173
174
174
175
if ( this . configService . useDocker ) {
175
176
const volumes = Object . entries ( dockerVolumes ) . map ( ( [ k , v ] ) => `-v "${ v } :${ k } "` ) . join ( ' ' ) ;
177
+ const userInfo = os . userInfo ( ) ;
178
+ const userArg = userInfo . uid !== - 1 ? `--user ${ userInfo . uid } :${ userInfo . gid } ` : `` ;
176
179
177
180
return [
178
181
`docker run --rm` ,
182
+ userArg ,
179
183
volumes ,
180
184
this . versionManager . getDockerImageName ( ) ,
181
185
'generate' ,
You can’t perform that action at this time.
0 commit comments