You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When attempting to use cocogitto on a self-hosted windows runner, the action will fail with the following error:
D:\GitHub\actions-runner_work_temp\3d7451bb-1855-4c7f-935b-ac2973a0bff8.sh: line 1: D:GitHubactions-runner_work_actionscocogittococogitto-actionv3.5/install.sh: No such file or directory
Error: Process completed with exit code 127.
I noticed that the path to my install.sh is missing all of the directory separators ()
D:GitHubactions-runner_work_actionscocogittococogitto-actionv3.5/install.sh --> D:\GitHub\actions-runner_work_actions\cocogitto\cocogitto-action\v3.5/install.sh
I tried looking into the issue and found the following:
The error you’re encountering seems to be related to the way paths are handled in Windows. In Unix-based systems like Linux or MacOS, paths are typically defined with forward slashes (/), while in Windows, paths are typically defined with backslashes ().
The error message suggests that the backslashes () in the path are being removed, which is a common issue when scripts written for Unix-based systems are run on Windows. This is because the backslash () is an escape character in Unix-based systems, so it’s often removed or treated differently.
To Reproduce
Create a windows-based self-hosted runner.
In a project, have a github workflow that has the following:
runs-on:
self-hosted
windows
Create a workflow that you can run with at least these steps.
Additional context
D:\GitHub\actions-runner_work_actions\cocogitto\cocogitto-action\v3.5 does exist on the self-hosted runner.
The install.sh script located there indicates that it is not targeting windows, as the cocogitto references unknown-linux.
I played around with this, and I ran into two main parts:
The install script needed to target the Windows version of cocogitto.
The action.yml should probably pass os information to the install.sh, or have the install.cs detect os. Then it can choose the appropriate cocogitto file to dl and unpack.
The .sh files need to be polished in such a way the paths work for Windows if a self-hosted windows runner uses it.
I was unable to use $Home, as all attempts to add it to my system path failed. I begrudgingly had to pass the cog.exe path to the cog.sh file.
A fork with commit of it in working order is here: Zayik@9256d0f
This is by no means production quality, but it should at least indicate some of the steps needed to add support for windows self-hosted runners.
Describe the bug
When attempting to use cocogitto on a self-hosted windows runner, the action will fail with the following error:
D:\GitHub\actions-runner_work_temp\3d7451bb-1855-4c7f-935b-ac2973a0bff8.sh: line 1: D:GitHubactions-runner_work_actionscocogittococogitto-actionv3.5/install.sh: No such file or directory
Error: Process completed with exit code 127.
I noticed that the path to my install.sh is missing all of the directory separators ()
D:GitHubactions-runner_work_actionscocogittococogitto-actionv3.5/install.sh --> D:\GitHub\actions-runner_work_actions\cocogitto\cocogitto-action\v3.5/install.sh
I tried looking into the issue and found the following:
The error you’re encountering seems to be related to the way paths are handled in Windows. In Unix-based systems like Linux or MacOS, paths are typically defined with forward slashes (/), while in Windows, paths are typically defined with backslashes ().
The error message suggests that the backslashes () in the path are being removed, which is a common issue when scripts written for Unix-based systems are run on Windows. This is because the backslash () is an escape character in Unix-based systems, so it’s often removed or treated differently.
To Reproduce
runs-on:
uses: actions/checkout@v3
with:
fetch-depth: 0 // aka ∞
name: Validate commits
uses: cocogitto/[email protected]
with:
check-latest-tag-only: true
Expected behavior
Cocogitto runs.
Additional context
D:\GitHub\actions-runner_work_actions\cocogitto\cocogitto-action\v3.5 does exist on the self-hosted runner.
The install.sh script located there indicates that it is not targeting windows, as the cocogitto references unknown-linux.
#!/bin/sh
CUR_DIR=$(pwd)
VERSION=5.4.0
TAR="cocogitto-$VERSION-x86_64-unknown-linux-musl.tar.gz"
BIN_DIR="$HOME/.local/bin"
mkdir -p "$BIN_DIR"
cd "$BIN_DIR" || exit
curl -OL https://github.com/cocogitto/cocogitto/releases/download/"$VERSION"/"$TAR"
tar xfz $TAR
cd "$CUR_DIR" || exit
I would expect this to be cocogitto-6.0.1-x86_64-pc-windows-msvc.tar.gz if I am understanding how the install system works on self-hosted runners.
The text was updated successfully, but these errors were encountered: