intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
27 stars 19 forks source link

Improve parsing of load path #487

Closed isc-shuliu closed 4 months ago

isc-shuliu commented 4 months ago

When running zpm "load <path>", the code checks for whether <path> starts with http (a git repo) or not (local dir or tarball).

While this is sufficient in almost all cases, a user might inadvertently parse in a relative path starting with http (w.r.t. <IRISROOT>/mgr/). A safer way is to check for prefix http:// and prefix https://.

isc-tleavitt commented 4 months ago

@isc-shuliu you might see %Net.URLParser for this.