Skip to content

Can't parse path containing spaces #4

@zhanyuanucb

Description

@zhanyuanucb

Describe the bug
Got No such command: _ while running bash example/run_docker.sh

To Reproduce
Steps to reproduce the behavior:

  1. Create a directory containing space (e.g. My Directory)
  2. Clone the pirlib repo to this directory and cd to this repo
  3. run bash example/run_docker.sh
  4. See the error

Environment (please complete the following information):

  • OS: MacOS
  • Terminal: iTerm

Additional context
This line convert relative path to absolute path

EXAMPLEDIR=$([[ $EXAMPLEDIR = /* ]] && echo "$EXAMPLEDIR" || echo "$PWD/${EXAMPLEDIR#./}")

If cd to the example directory and comment out this line, then the run_docker.sh can be successfully executed.
Or using VSCode terminal to run bash example/run_docker.sh as the converted path won't contain spaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions