Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 601ad00

Browse files
Merge pull request #380 from secrethub/fix/migration-tool-plan-org-no-perms
Skip path if the person in org does not have any permissions
2 parents 7da1711 + f6a398e commit 601ad00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internals/secrethub/migrate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ func (cmd *MigratePlanCommand) addDirToPlan(client secrethub.ClientInterface, pa
256256
fmt.Fprintf(cmd.io.Output(), "Planning migration for %s\n", path)
257257

258258
tree, err := client.Dirs().GetTree(path, -1, false)
259-
if err == api.ErrForbidden {
260-
fmt.Fprintf(os.Stderr, "WARN: Skipping %s because you do not have read access. ", path)
259+
if err == api.ErrForbidden || api.IsErrNotFound(err) {
260+
fmt.Fprintf(os.Stderr, "WARN: Skipping '%s' because you do not have read access. ", path)
261261
accessLevels, err := client.AccessRules().ListLevels(path)
262262
if err == nil {
263263
var usernames []string

0 commit comments

Comments
 (0)