dvc: dvc: possible path translation problems on mingw

$ dvc run -v -d data/Posts.xml.tgz -o data/Posts.xml tar zxf data/Posts.xml.tgz -C data/
Debug: updater is not old enough to check for updates
Debug: PRAGMA user_version;
Debug: fetched: [(2,)]
Debug: CREATE TABLE IF NOT EXISTS state (inode INTEGER PRIMARY KEY, mtime TEXT NOT NULL, md5 TEXT NOT NULL, timestamp TEXT NOT NULL)
Debug: CREATE TABLE IF NOT EXISTS state_info (count INTEGER)
Debug: CREATE TABLE IF NOT EXISTS link_state (path TEXT PRIMARY KEY, inode INTEGER NOT NULL, mtime TEXT NOT NULL)
Debug: INSERT OR IGNORE INTO state_info (count) SELECT 0 WHERE NOT EXISTS (SELECT * FROM state_info)
Debug: PRAGMA user_version = 2;
Running command:
        tar zxf data/Posts.xml.tgz -C data/
/c: /c: Is a directory
Debug: SELECT count from state_info WHERE rowid=1
Debug: fetched: [(1,)]
Debug: UPDATE state_info SET count = 1 WHERE rowid = 1
Error: Traceback (most recent call last):
  File "dvc\command\run.py", line 18, in run
  File "dvc\project.py", line 265, in run
  File "dvc\stage.py", line 435, in run
StageCmdFailedError: Stage 'Posts.xml.dvc' cmd tar zxf data/Posts.xml.tgz -C data/ failed

Error: Failed to run command: Stage 'Posts.xml.dvc' cmd tar zxf data/Posts.xml.tgz -C data/ failed

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I confirm that now it rocks on mingw! Thanks a million for your quick fix.

I’ve released 0.20.0 with this fix. Please feel free to upgrade.

@mjmikulski I’m closing this issue for now. I understand that you will only be able to check if it works for you on Monday, so please feel free to reopen.

Thank you guys for all the feedback!

@efiop Works with Cygwin, thank you!

Ok, got it. Looks like cygwin provides $SHELL env variable, which is /usr/bin/bash and is in posix style. Then, when dvc executes the command, it has both posix and nt style paths, which then get translated into nt paths, since conda’s python was not built for cygwin. And obviously /usr/bin/bash is no longer valid when converted to nt path. Preparing a patch right now.