intersystems / intersystems/git-source-control

Config script does not save supplied git bin path

Offen
#771 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
ObjectScript
Sterne
22
Forks
14
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
5

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie in SourceControl.Git.Settings.ConfigureBinPath() und verfolgen Sie Configure(), GitBinExists(.version) und die Zuweisung von @sysStorage. Reproduzieren Sie das angegebene Pfadverhalten in einem IRIS-Terminal und überprüfen Sie anschließend, dass ein gültiger Pfad beibehalten wird und ein ungültiges Git-Ergebnis behandelt wird, bevor die Konfiguration abgeschlossen ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.