Skip to content

The load command also unpacks to the standard directory#1147

Open
isc-dchui wants to merge 2 commits into
mainfrom
fix-945
Open

The load command also unpacks to the standard directory#1147
isc-dchui wants to merge 2 commits into
mainfrom
fix-945

Conversation

@isc-dchui
Copy link
Copy Markdown
Collaborator

Description

  • Resolves IPM load - setting a custom target directory #945
  • load will also unpack tarballs/copy non-tarball sources to the ${ipmdir} directory that install uses
  • Also fixes a bunch of call sights that directly call into %File.Library.CreateDirectoryChain instead of the wrapper that properly handles the error codes, e.g. -13 = Permission denied

Testing

Added new test to Test.PM.Integration.FileBinaryTar
Tested the error handling wrapper and got this very readable error:

zpm:USER>install isc.json

ERROR! Error creating directory chain /usr/irissys/ipm/isc.json/2.0.1/: <13> Permission denied

Checklist

  • This branch has the latest changes from the main branch rebased or merged.
  • Changelog entry added.
  • Unit (zpm test -only) and integration tests (zpm verify -only) pass.
  • Style matches the style guide in the contributing guide.
  • Documentation has been/will be updated
    • Source controlled docs, e.g. README.md, should be included in this PR and Wiki changes should be made after this PR is merged (add an extra issue for this if needed)
  • Pull request correctly renders in the "Preview" tab.

isc-dchui added 2 commits May 11, 2026 17:16
…x error handling by using wrapper for directory chain creation everywhere
Copy link
Copy Markdown
Collaborator

@isc-kiyer isc-kiyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isc-dchui few small notes. Probably worth waiting until #1149 is merged before merging this one in

@@ -156,7 +156,7 @@ ClassMethod CreateDirectoryChain(pName As %String) As %Status
{
set tSC = $$$OK
if '##class(%Library.File).CreateDirectoryChain(pName,.tReturn) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also be updated to use %IPM.Util.File:CreateDirectoryChain()?

Comment thread src/cls/IPM/Main.cls
// where the developer works on files in-place.
if '$get(tParams("DeveloperMode"), 0) {
set tModuleObj = ##class(%IPM.Utils.Module).GetModuleObjectFromPath(tTargetDirectory, .tFound)
set tFinalDirectory = ##class(%Library.File).NormalizeDirectory(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use ModuleRoot once the other PR is merged in

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.

IPM load - setting a custom target directory

3 participants