Skip to content

Commit 45bb8d5

Browse files
committed
remove positional arguments, it does not work on windows
1 parent b1ace78 commit 45bb8d5

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

justfile

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
22
set unstable := true
33
set script-interpreter := ['uv', 'run', '--script']
4-
set positional-arguments := true
54

65
export PYTHONPATH := source_directory()
76

@@ -10,7 +9,7 @@ default:
109
@just --list --list-submodules
1110

1211
[script]
13-
_manage *COMMAND:
12+
manage *COMMAND:
1413
import os
1514
import sys
1615
import shlex
@@ -19,38 +18,6 @@ _manage *COMMAND:
1918
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings.base")
2019
management.execute_from_command_line(["just manage", *shlex.split("{{ COMMAND }}")])
2120

22-
# run the django admin
23-
manage *COMMAND:
24-
#! /bin/sh
25-
ARGS_LIST=""
26-
for arg in "$@"; do
27-
case "$arg" in
28-
*[[:space:]]*)
29-
# Argument contains a space; wrap it in quotes.
30-
ARGS_LIST="${ARGS_LIST} \"\'${arg}\'\""
31-
;;
32-
*)
33-
# No spaces, print as-is.
34-
ARGS_LIST="${ARGS_LIST} ${arg}"
35-
;;
36-
esac
37-
done
38-
eval "just _manage $ARGS_LIST"
39-
40-
# run the django admin
41-
[windows]
42-
manage *COMMAND:
43-
$ARGS_LIST = ""
44-
foreach ($arg in $args) {
45-
if ($arg -match "\s") {
46-
$ARGS_LIST += " " + '"' + "'" + $arg + "'" + '"'
47-
}
48-
else {
49-
$ARGS_LIST += " " + $arg
50-
}
51-
}
52-
Invoke-Expression "just _manage $ARGS_LIST"
53-
5421
# install the uv package manager
5522
[linux]
5623
[macos]

0 commit comments

Comments
 (0)