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.

Metadata

Metadata

Assignees

Labels

bugDid we break something?

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions