aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-project
diff options
context:
space:
mode:
authorBob Tolbert <bob@eyesopen.com>2025-08-19 11:31:46 -0500
committerCalvin Rose <calsrose@gmail.com>2025-08-19 19:46:52 -0500
commit87dafa657b9d7198b761851ad5bb3a60f47e2ee6 (patch)
tree8f17ce0cfc1b0a356c33dcecc7866a20e549a6b1 /test-project
parentmake sure pre/postinstall are run withdyns *install-manifest* (diff)
Brief: Fix missing dynamic :syspath inside binscript main.
Remove need for PEG for defn main in binscripts. Summary: Rather than try to add code into a main in a binscript, this change removes the extra line added to all binscripts that remove the dynamic :syspath, if it was added at the top. I'm not sure why it needs to be removed but certainly, removing it means it is not defined when main runs which means janet-pm tries to install into the system syspath, even when a dynamic syspath is set.
Diffstat (limited to 'test-project')
-rw-r--r--test-project/bin/bin-no-hardcode7
-rw-r--r--test-project/bin/bin-with-main2
-rw-r--r--test-project/bin/bin-with-oneline-main5
-rw-r--r--test-project/project.janet10
4 files changed, 1 insertions, 23 deletions
diff --git a/test-project/bin/bin-no-hardcode b/test-project/bin/bin-no-hardcode
deleted file mode 100644
index afc7740..0000000
--- a/test-project/bin/bin-no-hardcode
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env janet
-
-(import spork)
-
-(defn- main
- [&]
- (printf "hello")) \ No newline at end of file
diff --git a/test-project/bin/bin-with-main b/test-project/bin/bin-with-main
index afc7740..394924c 100644
--- a/test-project/bin/bin-with-main
+++ b/test-project/bin/bin-with-main
@@ -4,4 +4,4 @@
(defn- main
[&]
- (printf "hello")) \ No newline at end of file
+ (printf (root-env :syspath))) \ No newline at end of file
diff --git a/test-project/bin/bin-with-oneline-main b/test-project/bin/bin-with-oneline-main
deleted file mode 100644
index 5616f3e..0000000
--- a/test-project/bin/bin-with-oneline-main
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env janet
-
-(import spork)
-
-(defn main [&] (printf "hello")) \ No newline at end of file
diff --git a/test-project/project.janet b/test-project/project.janet
index dfbf509..42028cb 100644
--- a/test-project/project.janet
+++ b/test-project/project.janet
@@ -17,16 +17,6 @@
:hardcode-syspath true
:is-janet true)
-(declare-binscript
- :main "bin/bin-with-oneline-main"
- :hardcode-syspath true
- :is-janet true)
-
-(declare-binscript
- :main "bin/bin-no-hardcode"
- :hardcode-syspath false
- :is-janet true)
-
(task "pre-build" ["pre-build-test"])
(task "post-build" ["post-build-test"])