darktable-org / darktable-org/lua-scripts
git commands not running on Windows
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 219
- Fork
- 142
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
On windows executing the git command fails from the lua scripts.
It might have something to do with my repo path containing a space. Thought just putting quotes around it does not fix it, there might be strange behaviour in combination with the & concatenator as well.
io.popen("cd " .. repo .. CS .. "git status")
->
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
8,8792 LUA ERROR: script_manager.lua: get_current_repo_branch: 318: no current branch detected in repo_data
In my opinion a better solution would be to use the -C <path> argument of git for all commands instead of changing the directory, and also quoting the repo string:
io.popen("git -C \"" .. repo .. "\" status")
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in script_manager.lua, in corrispondenza di get_current_repo_branch, intorno alla riga 318, e segui gli script Lua che invocano git tramite io.popen. Prova un percorso del repository contenente spazi su Windows e verifica che git status e gli altri comandi interessati risolvano correttamente il repository senza cambiare directory.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, lua
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 62/100