Skip to content

Commit

Permalink
Merge pull request #753 from m1yam0t0/fix-windows-installation
Browse files Browse the repository at this point in the history
Powershell 7.3 以降でも動作するように、Windows でのセットアップスクリプトを修正
  • Loading branch information
m1yam0t0 authored Mar 10, 2024
2 parents 70b868d + dc0c6f4 commit cb6af60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ Write-Host 'Install packages via scoop'
If (Get-Command scoop) {
Write-Host 'scoop has already installed.'
} else {
{{- if .github_actions }}
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
{{- else }}
irm get.scoop.sh | iex
{{- end }}
$env:PSModulePath = ''; Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
}

# Install Package via scoop
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/check-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set ExecutionPolicy
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
- name: Install
run: |
'$params = "-b $HOME/.local/bin init --apply --branch ${{ github.ref_name }} m1yam0t0"', (irm https://get.chezmoi.io/ps1) | powershell -c -
run: iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b $HOME/.local/bin -- init --apply --branch ${{ github.ref_name }} m1yam0t0"
- name: Remove chezmoi binary
run: |
rm $HOME/.local/bin/chezmoi.exe -Force
run: rm $HOME/.local/bin/chezmoi.exe -Force

0 comments on commit cb6af60

Please sign in to comment.