intersystems / intersystems/git-source-control

Config script does not save supplied git bin path

Aperta
#771 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
ObjectScript
Stelle
22
Fork
14
Merge medio
1g 9h
PR unite (30g)
5

Descrizione

I had installed git to a location in my user app directory, so it did not end up in the PATH and Iris does not find it when kicking off `d ##class(SourceControl.Git.API).Configure()`

if I run `$zf(-100)` with `C:\full\path\to\bin\git.exe --version` from an Iris terminal, it can report back the version of git I have installed, even with it being installed in my user app directory.

However, when I provide that folder path to `Configure()`, it reports "You are now using (blank)".

I did not catch this as a problem at first and got really confused when I encountered `` errors later in the setup ([see here](https://github.com/intersystems/git-source-control/issues/462#issuecomment-2886913459)).

Inside `SourceControl.Git.Settings.ConfigureBinPath()` I see 2 potential improvements:

1. Check the return value of `GitBinExists(.version)`. If nothing is returned: raise alarm bells and hard quit out of the configure process (because the whole point of this module is to set up source control)
2. If the `..gitBinPath` property is not set, then the valid supplied `path` value is not actually saved into `@sysStorage`

## Environment Stats

- git-source-control: v2.11.0
- `$zv`: IRIS for Windows (x86-64) 2023.1.5 (Build 697U) Thu Oct 3 2024 13:47:51 EDT

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start in SourceControl.Git.Settings.ConfigureBinPath() and trace Configure(), GitBinExists(.version), and the @sysStorage assignment. Reproduce the supplied path behavior from an IRIS terminal, then verify that a valid path is retained and an invalid Git result is handled before configuration completes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git
Ambito
devtools
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.