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

ImportAll SUBSCRIPT error in ListItemsInFiles #713

Open
Antoine-dh opened this issue Feb 25, 2025 · 0 comments · May be fixed by #715
Open

ImportAll SUBSCRIPT error in ListItemsInFiles #713

Antoine-dh opened this issue Feb 25, 2025 · 0 comments · May be fixed by #715

Comments

@Antoine-dh
Copy link
Contributor

Antoine-dh commented Feb 25, 2025

  • Git source control version: 2.10.0
  • $ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2024.1.2 (Build 398U) Thu Oct 3 2024 14:20:43 EDT

Error log:

USER>do ##class(SourceControl.Git.Utils).ImportAll()

==import start==
        set itemList(..NameToInternalName(configFilePath)) = ""
        ^
<SUBSCRIPT>ListItemsInFiles+5^SourceControl.Git.Utils.1 *itemList() Subscript 1 is ""
USER>

The error seems to originate from the ##class(%File).NormalizeFilename(##class(SourceControl.Git.Settings.Document).#EXTERNALNAME, ..TempFolder()) method returning an empty string and ##class(%File).Exists(##class(%File).NormalizeFilename("")) returning 1 (true) because ##class(%File).NormalizeFilename("") returns the current work directory, consequently entering the following if statement with configFilePath set to ""

set itemList(..NameToInternalName(configFilePath)) = ""

see the following terminal log:

USER>w ..TempFolder()
/irisdata/durable/mgr/repo/USER/
USER>w ##class(SourceControl.Git.Settings.Document).#EXTERNALNAME
embedded-git-config.json
USER>set configFilePath = ##class(%File).NormalizeFilename(##class(SourceControl.Git.Settings.Document).#EXTERNALNAME, ..TempFolder())
USER>w configFilePath

USER>w ##class(%File).Exists(##class(%File).NormalizeFilename(configFilePath))
1
USER>

For context, I realized later that the /irisdata/durable/mgr/repo/USER/embedded-git-config.json file does not exist on the machine. Nevertheless, it should have been skipped instead of entering this if statement

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 a pull request may close this issue.

1 participant