bug: PowerShell refuses to execute the generated script files #910
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 assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner#910
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Can you reproduce the bug on the Forgejo test instance?
No
Description
Windows PowerShell refuses to execute scripts whose file names do not end with
.ps1. The Forgejo runner createsrunscript files with no extension at all. An impasse.I would fix this by allowing the name of the generated script file to be configurable somehow.
The workaround I've found is to use this as your
shell:powershell -Command "$a = '{0}'; $b = $a + '.ps1'; Rename-Item -Path $a -NewName $b; . $b"The issue was encountered when trying to set up the Windows port of the Forgejo runner to run in host mode on a bare metal Windows machine and execute build scripts written for PowerShell 5.1.
Forgejo Version
12.0.1
Runner Version
6.3.1
How are you running Forgejo?
I downloaded the Forgejo binary from your website and followed the Installation from Binary instructions. The only deviations from these instructions is that I have configured it to keep all its data in a mounted volume instead of /var/lib and that I have disabled LFS support.
How are you running the Runner?
I downloaded a Windows binary from Github and configured it to run in host mode and with debug level set to trace. I then launch it myself from Windows command prompt and test it. Once it is all working I intend to create a user for it and run it as a service using WinSW.
Logs
Workflow file
@Crown0815 FYI
@AnsisMalins
Can you please upgrade to the latest runner, v9.1.1, and retest?
As this functionality is covered by automated tests and, on the surface, appears to name all shell files with
.ps1suffix (name += ".ps1"), I'm wondering if this may have been addressed already in one of the releases since then.
6.3.1 is the newest Windows binary that's available, and I was unable to build from source.
https://github.com/Crown0815/forgejo-runner-windows/tags indeed
It seems @Crown0815 is not currently available. I'm going to close this because this is not the repository where windows support happen. Could you please file an issue at https://github.com/Crown0815/forgejo-runner-windows/issues instead? 🙏