fix: error if explicit canister path is bad - #276
Merged
raymondk merged 4 commits intoJan 16, 2026
Merged
Conversation
viviveevee
marked this pull request as ready for review
January 16, 2026 10:18
raymondk
reviewed
Jan 16, 2026
| // For explicit paths, validate that they exist and contain canister.yaml | ||
| let mut validated_paths = vec![]; | ||
| for p in paths { | ||
| if !p.is_dir() { |
Collaborator
There was a problem hiding this comment.
Can we just use p.is_file() ?
Collaborator
There was a problem hiding this comment.
Otherwise the errors should be fixed, p.is_dir to say the directory doesn't exist and the path joined with canister.yaml to say the canister definition doesn't exist.
raymondk
approved these changes
Jan 16, 2026
raymondk
deleted the
SDK-2508-canister-manifest-location-doesnt-throw-an-error-if-canister-yaml-is-not-found
branch
January 16, 2026 13:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When explicit (non-glob) canister paths in icp.yaml didn't exist or lacked a canister.yaml file, they were silently ignored instead of throwing an error.
Now glob patterns get treated differently from explicit paths and if an explicit path does not exist,
icp project showthrows an error