mirror of
https://github.com/mmvanheusden/SteamDepotDownloaderGUI.git
synced 2026-02-04 05:31:19 +01:00
fix(workflow): truncate path
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -62,22 +62,21 @@ jobs:
|
||||
with:
|
||||
args: ${{ matrix.args }}
|
||||
includeUpdaterJson: false
|
||||
|
||||
|
||||
- name: fix JSON
|
||||
id: truncate_paths
|
||||
run: echo "::set-output name=paths::$(echo '${{ steps.build.outputs.artifactPaths }}' | sed 's/^..//' | sed 's/..$//')"
|
||||
|
||||
run: echo "paths=$(echo '${{ steps.build.outputs.artifactPaths }}' | sed 's/^..//' | sed 's/..$//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload unix artifacts
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-22.04'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: ${{ steps.build.outputs.artifactPaths }}
|
||||
|
||||
path: ${{ steps.truncate_paths.outputs.paths }}
|
||||
|
||||
- name: upload windows artifacts
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: ${{ steps.build.outputs.artifactPaths }}
|
||||
path: ${{ steps.truncate_paths.outputs.paths }}
|
||||
@@ -2,7 +2,6 @@ use crate::steam::SteamDownload;
|
||||
use async_process::Command;
|
||||
use serde::Serialize;
|
||||
use std::{env, fs};
|
||||
use std::fs::File;
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
use crate::get_os;
|
||||
|
||||
@@ -318,7 +317,11 @@ impl Terminal {
|
||||
// println!("{}", download_script);
|
||||
|
||||
fs::write("./script.sh", download_script).unwrap();
|
||||
fs::set_permissions("./script.sh", fs::Permissions::from_mode(0o755)).unwrap(); // Won't run without executable permission
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
fs::set_permissions("./script.sh", fs::Permissions::from_mode(0o755)).unwrap(); // Won't run without executable permission
|
||||
}
|
||||
|
||||
let mut cmd = Command::new("/usr/bin/open");
|
||||
cmd.args(&["-a", "Terminal", "./script.sh"]);
|
||||
|
||||
Reference in New Issue
Block a user