File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env nu --stdin
2
2
3
+ const script_path = path self .
4
+
3
5
# Helper to run topiary with the correct environment variables for topiary-nushell
4
6
@example " Read from stdin" { bat foo.nu | format .nu }
5
7
@example " Format files (in-place replacement)" { format .nu foo.nu bar.nu }
@@ -8,7 +10,7 @@ def main [
8
10
-- config_dir (- c ): path # Root of the topiary-nushell repo, defaults to the parent directory of this script
9
11
... files : path # Files to format
10
12
]: [nothing - > nothing string - > string ] {
11
- let config_dir = $config_dir | default ( pwd )
13
+ let config_dir = $config_dir | default $script_path
12
14
$env .TOPIARY_CONFIG_FILE = ($config_dir | path join languages.ncl )
13
15
$env .TOPIARY_LANGUAGE_DIR = ($config_dir | path join languages )
14
16
You can’t perform that action at this time.
0 commit comments