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

Fix executing script name on Windows #451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cswartzvi
Copy link

Hello, first time contributor. This is a lovely project. On Windows, and specifically when installed via conda, doit --help displays the path of the entire executing script (see below). This PR corrects that by using os.path.split vice .split('/'). Question: why not just display the name as doit? It looks like there was considerable thought behind persevering the name of the executing script, I was curious as to its use case.

❯ doit --help 
doit -- automation tool
http://pydoit.org

Commands
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py clean             clean action / remove targets
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py dumpdb            dump dependency DB
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py forget            clear successful run status from internal DB
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py help              show help
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py ignore            ignore task (skip) on subsequent runs
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py info              show info about a task
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py list              list tasks from dodo file
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py reset-dep         recompute and save the state of file dependencies without executing actions
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py run               run tasks
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py strace            use strace to list file_deps and targets
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py tabcompletion     generate script for tab-completion

  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py help              show help / reference
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py help task         show help on task dictionary fields
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py help <command>    show command usage
  C:\Users\Charles\AppData\Local\mambaforge\Scripts\doit-script.py help <task-name>  show task usage

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

Successfully merging this pull request may close these issues.

1 participant