From 22751c3d2b2510a8e62c55e989822763573bd34e Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 19 Oct 2021 16:15:13 +0200 Subject: [PATCH] pwsh --- .github/workflows/symlink-test.yml | 16 +++++++++++++++- bang/duh.txt | 1 - 2 files changed, 15 insertions(+), 2 deletions(-) delete mode 100644 bang/duh.txt diff --git a/.github/workflows/symlink-test.yml b/.github/workflows/symlink-test.yml index 9d99299..ee26660 100644 --- a/.github/workflows/symlink-test.yml +++ b/.github/workflows/symlink-test.yml @@ -24,10 +24,11 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} # symlink - - name: Symlink + - name: Symlink Bash shell: bash run: | if ! [ -L bang ]; then + # however, this does *not* create a symlink, but a directory ln -s duh bang ls -l git config --global user.email "stephan@REDACTED.com" @@ -37,6 +38,19 @@ jobs: git commit -m "created symlink" fi + # symlink via pwsh + - name: Symlink Pwsh + shell: pwsh + run: | + if (! (test-path bang)) { + New-Item -ItemType SymbolicLink -Name bang -Target duh + git config --global user.email "stephan@REDACTED.com" + git config --global user.name "Stephan" + git config --global core.symlinks "true" + git add bang + git commit -m "created symlink" + } + # push changes back - name: Push shell: bash diff --git a/bang/duh.txt b/bang/duh.txt deleted file mode 100644 index 9301c68..0000000 --- a/bang/duh.txt +++ /dev/null @@ -1 +0,0 @@ -duh