Skip to content

run: escape arguments with spaces in it #1372

Closed
@efiop

Description

@efiop
#!/bin/bash

set -e
set -x

rm -rf myrepo
mkdir myrepo
cd myrepo

git init
dvc init

echo 'echo $1' > script.sh
chmod +x script.sh

./script.sh arg1 arg2
./script.sh 'arg1 arg2'

dvc run ./script.sh 'arg1 arg2'

arg1 arg2 are passed as a single argument to dvc, but we join() it in dvc/command/run.py, without escaping it, causing such behavior.

Activity

added this to the Queue milestone on Nov 27, 2018
self-assigned this
on Nov 27, 2018
added a commit that references this issue on Nov 30, 2018
426bc5e
added a commit that references this issue on Nov 30, 2018
ff577d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugDid we break something?

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @efiop

      Issue actions

        run: escape arguments with spaces in it · Issue #1372 · iterative/dvc