chore: remove workflow command add-path #1616
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
run-multi-platform-tests
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner!1616
Loading…
Reference in a new issue
No description provided.
Delete branch "aahlenst/runner:remove-add-path"
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?
The workflow command
add-pathallows amendingPATHthat is injected into successive steps. Unfortunately, it is difficult to use securely. Therefore, it is removed from Forgejo Runner. If workflows still useadd-path, a warning will be printed. Contrary to GitHub Actions, it is not possible to restore it again by setting the environment variableACTIONS_ALLOW_UNSECURE_COMMANDS=truebecause better alternatives exist. Workflows that need to amendPATHof successive steps should write to$FORGEJO_PATH:See #1455 and GitHub Actions: Deprecating set-env and add-path commands.
This function
func (rc *RunContext) addPath(ctx context.Context, arg string) {common.Logger(ctx).WithFields(logrus.Fields{"command": "add-path", "arg": arg}).Infof(" \U00002699 ::add-path:: %s", arg)extraPath := []string{arg}for _, v := range rc.ExtraPath {if v != arg {extraPath = append(extraPath, v)}}rc.ExtraPath = extraPath}is still needed. However, I'm a bit unsure what to do about the log message
because it still refers to the command
add-path.cascading-pr updated at actions/setup-forgejo#1039
@aahlenst wrote in #1616 (comment):
The first concern with logging in runner is always, "is it really logging, or does it do something functional"? Surely it can't be functional here because that would be causing an infinite loop in the command handler, so pretty confident that isn't the case.
Maybe just change it to indicate
%q was added to PATH?806290f03785088b4ba6cascading-pr updated at actions/setup-forgejo#1039
85088b4ba6686b364275@mfenniak wrote in #1616 (comment):
Thanks! Done.
cascading-pr updated at actions/setup-forgejo#1039
686b364275a3df21030ccascading-pr updated at actions/setup-forgejo#1039