Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Print better error when processing appcenter paths #1287

Merged
merged 1 commit into from Jul 14, 2022

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Jul 14, 2022

Before:

> Fetching latest AppCenter deployment info
> Processing react-native AppCenter sourcemaps
error: No such file or directory (os error 2)

After:

> Fetching latest AppCenter deployment info
> Processing react-native AppCenter sourcemaps
error: Failed processing path: "./src/missing_dir"
  caused by: No such file or directory (os error 2)

Fixes #1286

@kamilogorek kamilogorek requested a review from a team July 14, 2022 09:19
@kamilogorek kamilogorek enabled auto-merge (squash) July 14, 2022 10:39
@kamilogorek kamilogorek merged commit 6e0c231 into master Jul 14, 2022
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

do we need to error our early? why can’t we just print the error and continue?

@@ -134,7 +134,10 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
let mut processor = SourceMapProcessor::new();

for path in matches.values_of("paths").unwrap() {
for entry in (fs::read_dir(path)?).flatten() {
let entries = fs::read_dir(path)
.map_err(|e| anyhow!(e).context(format!("Failed processing path: \"{}\"", &path)))?;
Copy link
Member

Choose a reason for hiding this comment

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

@kamilogorek kamilogorek deleted the better-appcenter-error branch July 14, 2022 11:09
@kamilogorek
Copy link
Contributor Author

kamilogorek commented Jul 14, 2022

I didnt want to change the behavior in patch release.

As for with_context, I couldn't get it working for IO::Error :<

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.

Unexpected argument parsing
2 participants