I'm trying to copy ~/.aws
into my docker container. But I'm on a Windows machine running git-bash
and that seems to be causing some issues.
Two things I've tried so far:
"d-aws-copy": "docker cp ~/.aws constraint-listener:/usr/src/app"
Result: GetFileAttributesEx C:\work\project-name\~: The system cannot find the file specified.
"d-aws-copy": "docker cp /c/Users/user-name-here/.aws constraint-listener:/usr/src/app",
Result: GetFileAttributesEx C:\c: The system cannot find the file specified.
All the solutions I've seen involving tilde expansion are for node code, not for command line npm scripts.
If I run docker cp ~/.aws constraint-listener:/usr/src/app
from bash it works fine. But inside of an npm script it crashes as seen above.
How can I get ~
to work in an npm script on a Windows machine?