ci: locate Choosenim library directory
48070f5 parent: f7be036 modified
.github/workflows/release.yml +5 -1 | @@ -74,7 +74,11 @@ jobs: | ||
| 74 | 74 | run: | |
| 75 | 75 | appdir=dist/clonim.AppDir |
| 76 | 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" |
| 77 | - nim_lib=$(nim dump --hints:off | tail -n 1) | |
| 77 | + nim_lib=$(nim dump --hints:off 2>&1 | grep '^/.*\/lib$' | tail -n 1) | |
| 78 | + test -f "$nim_lib/system.nim" || { | |
| 79 | + echo "Unable to locate Nim's library directory" >&2 | |
| 80 | + exit 1 | |
| 81 | + } | |
| 78 | 82 | nim_root=$(dirname "$nim_lib") |
| 79 | 83 | nim_bin="$nim_root/bin/nim" |
| 80 | 84 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" |
| @@ -74,7 +74,11 @@ jobs: | |||
| 74 | run: | | 74 | run: | |
| 75 | appdir=dist/clonim.AppDir | 75 | appdir=dist/clonim.AppDir |
| 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" | 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" |
| 77 | - nim_lib=$(nim dump --hints:off | tail -n 1) | 77 | + nim_lib=$(nim dump --hints:off 2>&1 | grep '^/.*\/lib$' | tail -n 1) |
| 78 | + test -f "$nim_lib/system.nim" || { | ||
| 79 | + echo "Unable to locate Nim's library directory" >&2 | ||
| 80 | + exit 1 | ||
| 81 | + } | ||
| 78 | nim_root=$(dirname "$nim_lib") | 82 | nim_root=$(dirname "$nim_lib") |
| 79 | nim_bin="$nim_root/bin/nim" | 83 | nim_bin="$nim_root/bin/nim" |
| 80 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" | 84 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" |