Skip to content

Commit da417b4

Browse files
committed
CI: Fix env:HOME
1 parent 29fa54e commit da417b4

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.github/workflows/.craft.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
if ($IsWindows) {
2-
if (-not ${env:HOME}) {
3-
$env:HOME = "${env:USERPROFILE}"
4-
}
52
$python = (Get-Command py).Source
63
$python=(py -c "import sys; print(sys.executable)")
4+
$env:HOME = ${HOME}
75
} else {
86
$python = (Get-Command python3).Source
97
}
@@ -12,11 +10,11 @@ if ($IsWindows) {
1210
$env:ANDROID_NDK = $null
1311

1412
$RepoRoot = "{0}/../../" -f ([System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition))
15-
$command = @("${env:HOME}/craft/CraftMaster/CraftMaster/CraftMaster.py",
13+
$command = @("${HOME}/craft/CraftMaster/CraftMaster/CraftMaster.py",
1614
"--config", "${RepoRoot}/.craft.ini",
1715
"--config-override", "${RepoRoot}/.github/workflows/craft_override.ini",
1816
"--target", "${env:CRAFT_TARGET}",
19-
"--variables", "WORKSPACE=${env:HOME}/craft") + $args
17+
"--variables", "WORKSPACE=${HOME}/craft") + $args
2018

2119
Write-Host "Exec: ${python} ${command}"
2220

.github/workflows/main.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,10 @@ jobs:
8282
~/ccache
8383
key: ${{ runner.os }}-${{ matrix.target }}
8484

85+
8586
- name: Clone CraftMaster
8687
run: |
87-
if ($IsWindows -and (-not ${env:HOME})) {
88-
$env:HOME = "${env:USERPROFILE}"
89-
}
90-
git clone --depth=1 https://invent.kde.org/kde/craftmaster.git "${env:HOME}/craft/CraftMaster/CraftMaster"
88+
git clone --depth=1 https://invent.kde.org/kde/craftmaster.git "${home}/craft/CraftMaster/CraftMaster"
9189
9290
- name: Craft setup
9391
run: |
@@ -175,7 +173,7 @@ jobs:
175173
176174
- name: Prepare artifacts
177175
run: |
178-
Copy-Item "$env:HOME/craft/binaries/*" "${env:GITHUB_WORKSPACE}/binaries/" -ErrorAction SilentlyContinue
176+
Copy-Item "${home}/craft/binaries/*" "${env:GITHUB_WORKSPACE}/binaries/" -ErrorAction SilentlyContinue
179177
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --shelve "${env:GITHUB_WORKSPACE}/.craft.shelf"
180178
Copy-Item "${env:GITHUB_WORKSPACE}/.craft.shelf" "${env:GITHUB_WORKSPACE}/binaries/"
181179

0 commit comments

Comments
 (0)