fix: host-based executor, clarify error message from missing working-directory #1257
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mfenniak/forgejo-runner:upgrade-missing-workdir-to-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Setting a step to a working directory that doesn't exist causes a
debug-level message, typically filtered out by the log level configuration, and then immediately follows with a confusing error. The working directory is the directory that cannot be found, but the error appears as:To address this, I've upgraded the
debug-level message to an error that stops execution.This is not a breaking change as it already would have stopped execution.
Fixes #1256.
Stat()would succeed on a file, but still be invalid. Might make sense to handle that case. As a nice side-effect, it would enable a nicer error message, for example, "working directory is a file" or "working directory does not exist". "failed to stat working directory" is not user-friendly.028ad7499200d01f0989That's a good call; the error message would otherwise be quite confusing there as well since it still seems associated with the shell:
I've added a
!IsDir()check and manually tested it:Thanks, great!
a test would have been nice 🙂