Skip to content

Commit 06d24fe

Browse files
[ci] E: Update zutils to v0.11.0
1 parent 22d9324 commit 06d24fe

3 files changed

Lines changed: 5 additions & 48 deletions

File tree

.zutils-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.10.4
1+
v0.11.0

z.ps1

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ catch {
5757
$null
5858
}
5959

60-
# Extract --with-zutils PATH and --with-nanvix PATH before forwarding to
61-
# nanvix-zutil.
60+
# Extract --with-zutils PATH before forwarding to nanvix-zutil.
6261
#
6362
# --with-zutils PATH (optional): install nanvix-zutil from a local source
6463
# tree (editable) instead of fetching the pinned wheel from GitHub Releases.
@@ -85,25 +84,6 @@ while ($i -lt $ZArgs.Count) {
8584
$withZutils = $Matches[1]
8685
$i++
8786
}
88-
elseif ($ZArgs[$i] -eq '--with-nanvix') {
89-
if ($i + 1 -ge $ZArgs.Count) {
90-
throw "ERROR: --with-nanvix requires a path argument"
91-
}
92-
$item = Get-Item -LiteralPath $ZArgs[$i + 1] -ErrorAction Stop
93-
if (-not $item.PSIsContainer) {
94-
throw "ERROR: --with-nanvix path is not a directory: $($ZArgs[$i + 1])"
95-
}
96-
$env:WITH_NANVIX = $item.FullName
97-
$i += 2
98-
}
99-
elseif ($ZArgs[$i] -match '^--with-nanvix=(.+)$') {
100-
$item = Get-Item -LiteralPath $Matches[1] -ErrorAction Stop
101-
if (-not $item.PSIsContainer) {
102-
throw "ERROR: --with-nanvix path is not a directory: $($Matches[1])"
103-
}
104-
$env:WITH_NANVIX = $item.FullName
105-
$i++
106-
}
10787
else {
10888
$filteredArgs.Add($ZArgs[$i])
10989
$i++

z.sh

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ function _resolve_venv_paths() {
5353
_resolve_venv_paths
5454
ZUTIL_GLOBAL_VERSION="$(nanvix-zutil --version 2>/dev/null || true)"
5555

56-
# Extract --with-zutils PATH and --with-nanvix PATH before forwarding to
57-
# nanvix-zutil. The nanvix-zutil CLI inspects positional args to find the
58-
# subcommand; either flag's PATH argument would be mistaken for a subcommand.
56+
# Extract --with-zutils PATH before forwarding to nanvix-zutil. The
57+
# nanvix-zutil CLI inspects positional args to find the subcommand; the
58+
# flag's PATH argument would otherwise be mistaken for a subcommand.
5959
#
6060
# --with-zutils PATH (optional): install nanvix-zutil from a local source
6161
# tree (editable) instead of fetching the pinned wheel from GitHub Releases.
@@ -67,8 +67,6 @@ ZUTIL_GLOBAL_VERSION="$(nanvix-zutil --version 2>/dev/null || true)"
6767
# The path must point at a nanvix-zutil source checkout (a directory
6868
# containing pyproject.toml). The venv version-match check is bypassed; the
6969
# editable install is rebuilt only when the recorded source path changes.
70-
#
71-
# --with-nanvix PATH is forwarded to z.py via the WITH_NANVIX env var.
7270
WITH_ZUTILS=""
7371
_resolve_zutils_path() {
7472
local raw="$1"
@@ -90,15 +88,6 @@ _resolve_zutils_path() {
9088
fi
9189
}
9290

93-
_resolve_nanvix_path() {
94-
local raw="$1"
95-
if ! WITH_NANVIX="$(cd -- "$raw" 2>/dev/null && pwd -P)"; then
96-
echo "ERROR: --with-nanvix path does not exist or is not a directory: $raw" >&2
97-
exit 1
98-
fi
99-
export WITH_NANVIX
100-
}
101-
10291
ARGS=()
10392
while [[ $# -gt 0 ]]; do
10493
case "$1" in
@@ -114,18 +103,6 @@ while [[ $# -gt 0 ]]; do
114103
_resolve_zutils_path "$2"
115104
shift 2
116105
;;
117-
--with-nanvix=*)
118-
_resolve_nanvix_path "${1#--with-nanvix=}"
119-
shift
120-
;;
121-
--with-nanvix)
122-
if [[ $# -lt 2 ]]; then
123-
echo "ERROR: --with-nanvix requires a path argument" >&2
124-
exit 1
125-
fi
126-
_resolve_nanvix_path "$2"
127-
shift 2
128-
;;
129106
*)
130107
ARGS+=("$1")
131108
shift

0 commit comments

Comments
 (0)