-
Notifications
You must be signed in to change notification settings - Fork 4.5k
CDK CLI errors when run as a non-existent user #7937
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
A regression in 1.37 means that the CDK CLI will error out if it is run by a user not in /etc/passwd
Reproduction Steps
npx cdk init app --language=typescript
npm install
docker run -u 502:502 -v $(pwd):/app -w /app node ./node_modules/.bin/cdk listError Log
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
at Object.userInfo (os.js:268:11)
at cdkHomeDir (/app/node_modules/aws-cdk/lib/util/directories.ts:7:21)
at Object.cdkCacheDir (/app/node_modules/aws-cdk/lib/util/directories.ts:11:20)
at new AccountAccessKeyCache (/app/node_modules/aws-cdk/lib/api/aws-auth/account-cache.ts:25:44)
at Object.<anonymous> (/app/node_modules/aws-cdk/lib/api/aws-auth/sdk.ts:38:42)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
Environment
- CLI Version : >= 1.37
- Framework Version:
- OS : Tested in Docker on MacOS
- Language : Typescript
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI