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

717 tmpdir flag silently fails when not a real directory #775

Merged

Conversation

Noxsios
Copy link
Contributor

@Noxsios Noxsios commented Sep 23, 2022

Description

Add error handling to inside of utils.makeTempDir instead of handling each instance it is run, since all errors will produce the same outcome. Users must first create the --tempdir path if they specify it.

This means that users will have to do mkdir -p <some temp path> before they will be able to run using the --tempdir flag. This is already handled in CI tests, which is the reason for the silent error during actual usage.

Related Issue

Fixes #717

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@Noxsios Noxsios linked an issue Sep 23, 2022 that may be closed by this pull request
src/internal/utils/io.go Outdated Show resolved Hide resolved
@Noxsios Noxsios requested a review from YrrepNoj September 29, 2022 01:35
src/internal/helm/post-render.go Outdated Show resolved Hide resolved
src/internal/api/packages/read.go Outdated Show resolved Hide resolved
src/internal/utils/io.go Outdated Show resolved Hide resolved
@Noxsios Noxsios self-assigned this Sep 29, 2022
src/internal/utils/io.go Outdated Show resolved Hide resolved
src/internal/api/packages/read.go Outdated Show resolved Hide resolved
src/internal/git/pull.go Outdated Show resolved Hide resolved
src/internal/helm/post-render.go Outdated Show resolved Hide resolved
src/internal/packager/common.go Outdated Show resolved Hide resolved
@Racer159
Copy link
Contributor

@Noxsios your first commit in this PR is not signed: [handle tmdir path dne](https://github.com/defenseunicorns/zarf/pull/775/commits/1e5192ceaa65d48a79d9b7a3db050b072a8f774e) I can help with that if you need.

@YrrepNoj
Copy link
Contributor

@Racer159 it looks like all the commits are signed from my perspective

@Racer159
Copy link
Contributor

@Racer159 it looks like all the commits are signed from my perspective

Ah yeah you're right I was looking at the wrong thing.

Copy link
Contributor

@jeff-mccoy jeff-mccoy left a comment

Choose a reason for hiding this comment

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

Lgtm

@jeff-mccoy jeff-mccoy dismissed Racer159’s stale review September 30, 2022 18:09

Concerns resolved

@jeff-mccoy jeff-mccoy merged commit 7cdc00a into master Sep 30, 2022
@bdfinst bdfinst deleted the 717-tmpdir-flag-silently-fails-when-not-a-real-directory branch January 12, 2023 22:33
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.

tmpdir flag silently fails when not a real directory
4 participants