2

trying to finish my switch "saves" from bricking.

error on last command on powershell:

  1. COMMAND: docker pull pablozaiden/deviceid-exosphere-builder NO PROBLEM

  2. COMMAND: mkdir -p ./output FINE

  3. COMMAND docker run -ti --rm -e DEVICEID=0x0065994B921FFA0A -v "$PWD"/output:/output pablozaiden/deviceid-exosphere-builder:latest

ERROR: Docker: invalid reference format

What is could be? Thanks

1 Answers1

1

tl;dr

Either: remove the " around $PWD (this will also work fine in directories whose paths happen to contain spaces):

docker run -ti --rm -e DEVICEID=0x0065994B921FFA0A -v $PWD/output:/output pablozaiden/deviceid-exosphere-builder:latest

Or: enclose the entire argument in "...":

docker run -ti --rm -e DEVICEID=0x0065994B921FFA0A -v "$PWD/output:/output" pablozaiden/deviceid-exosphere-builder:latest

As for what you tried:

"$PWD"/output:/output is passed as two arguments by PowerShell:

  • the (stringified) value of the automatic $PWD variable representing the current location (directory)

  • verbatim /output:/output

Unlike POSIX-compatible shells such as bash, PowerShell doesn't support composing a single string argument from a mix of quoted and unquoted tokens, except if the initial token is unquoted. See this answer for details.

mklement0
  • 382,024
  • 64
  • 607
  • 775