mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
Sandbox fails for unsupported cmds (#129)
* introduce enforce_always sandbox config & hooks for flows * fix sandbox failing for unsupported commands * add hooks for pypi package managers * add tests for sandbox hook * introduce enforce_always flag for ease use & CI * make comments descriptive * remove hooks & update config to add API to configure sandbox * add comments * rm unused function
This commit is contained in:
@@ -40,6 +40,11 @@ type ParsedCommand struct {
|
||||
ManifestFiles []string
|
||||
}
|
||||
|
||||
// IsInstallationCommand returns true if command installs packages (explicit targets or from manifest).
|
||||
func (pc *ParsedCommand) IsInstallationCommand() bool {
|
||||
return pc.HasInstallTarget() || pc.HasManifestInstall()
|
||||
}
|
||||
|
||||
func (pc *ParsedCommand) HasInstallTarget() bool {
|
||||
return len(pc.InstallTargets) > 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user