Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Typical workflow" observations on Windows #50

Open
adswa opened this issue Nov 10, 2020 · 0 comments
Open

"Typical workflow" observations on Windows #50

adswa opened this issue Nov 10, 2020 · 0 comments

Comments

@adswa
Copy link
Contributor

adswa commented Nov 10, 2020

As I have a Win 10 Pro build 2004 box for testing, @yarikoptic asked me to test the "Typical Workflow" from the README on Windows.

I'm testing under two different terminals/shells: A Git Bash and an Anaconda Prompt (both installed using the most recent instructions from the handbook).

Unfortunately, testing required more time than I anticipated, so I'm posting the issue "as is", although I haven't finished the workflow. I will return to this at a later point.

Git Bash:

  • Pro: Copy-pasting the script directly into the terminal works because Git Bash supports multi-line commands
  • datalad run -m 'Downgrade/Freeze mriqc container version' containers/scripts/freeze_versions bids-mriqc=0.15.1 fails when copy-pasting and when executing in a script with:
> datalad run -m 'Downgrade/Freeze mriqc container version' containers/scripts/freeze_versions bids-mriqc=0.15.1
[INFO] == Command start (output follows) =====
'"containers/scripts/freeze_versions"' is not recognized as an internal or external command,
operable program or batch file.
[INFO] == Command exit (modification check follows) =====
[INFO] The command had a non-zero exit code. If this is expected, you can save the changes with 'datalad save -d . -r -F .git\COMMIT_EDITMSG'
CommandError: '"containers/scripts/freeze_versions" "bids-mriqc=0.15.1"' failed with exitcode 1 under C:/Users/datalad/AppData/Local/Temp/repro-x8Gb5J4/ds000003-qc

A fix for this would be to invoke datalad run with bash <script>:

datalad@latitude-e7440 MINGW64 /tmp/repro-Yo4XEyy/ds000003-qc (adjusted/master(unlocked))
$ datalad run -m "Downgrade/Freeze mriqc container version" bash containers/scripts/freeze_versions bids-mriqc=0.15.1
[INFO] == Command start (output follows) =====
I: bids-mriqc -> 0.15.1
[INFO] == Command exit (modification check follows) =====
[INFO] Total: starting
[INFO]
add(ok): .datalad\config (file)
[INFO] Total: processed result for C:\Users\datalad\AppData\Local\Temp\repro-Yo4XEyy\ds000003-qc\containers
save(ok): containers (dataset)
add(ok): containers (file)
[INFO] Total: processed result for C:\Users\datalad\AppData\Local\Temp\repro-Yo4XEyy\ds000003-qc
save(ok): . (dataset)
[INFO] Total: done
action summary:
  add (ok: 2)
  save (ok: 2)

Anaconda Prompt:

  • Fail: You can't copy paste the command into the terminal. I believe Windows needs ^ at each line ending in multi-line commands (see the last Windows-Workaround in this section
  • I can't currently say definite things about what happens when I execute the script via "bash " in Anaconda prompt, because I'm seeing a very weird interaction between Windows and WSL2, where a bash session from Windows ends up in WSL2:
(base) C:\Users\datalad\repos>echo "This is anaconda prompt on native Windows 10!"
"This is anaconda prompt on native Windows 10!"

(base) C:\Users\datalad\repos>echo %username%
datalad

(base) C:\Users\datalad\repos>bash
adina@latitude-e7440:/mnt/c/Users/datalad/repos$ groups
adina adm cdrom sudo dip plugdev
adina@latitude-e7440:/mnt/c/Users/datalad/repos$ echo "WTAF"
WTAF
adina@latitude-e7440:/mnt/c/Users/datalad/repos$

I need to redo this after wiping the machine again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant