Comments (7)
Unfortunately I don't think System.argv will work today... unless you set it explicitly or we do improvements to releases. :)
from bakeware.
I was playing around with bakeware today and I am impressed how clean the end result feels. I've dealt with plenty of small systems utilities (like stuff written in Go) and they have the benefit of dropping a small (<10mb) blob on a box and running it. A bakeware bundle feels a lot like that. But those kinds of small applications typically lean heavily on arguments. If the whole argv issue could be sorted it out it would open up a lot more use cases for using Elixir, and would generally be more flexible for everyone. I hope this is something that can be worked out over time, but looking at how releases work I can see how it's not immediately feasible.
Edit: I was able to kind of replicate argv() behavior by iterating over the environment variables, I had a case of the RTFM here but this works
defp argv() do
nargs =
System.get_env("BAKEWARE_ARGC")
|> String.to_integer()
for n <- 1..nargs, do: System.get_env("BAKEWARE_ARG#{n}")
end
from bakeware.
I love you, guys! ❤️
from bakeware.
Yes! In our rush, we totally missed System.argv
, but we definitely want to switch to that. That will clean up one of the areas that I was unhappy with and wanted to revisit. Thanks!
from bakeware.
Why wouldn't argv
work?
Does this not run the regular start script that simply appends the additional args to the erl command? I did similar to this project with makeself.io and argument passing works fine if I remember correctly.
from bakeware.
@tsloughter so, our current release doesn't do that :)
from bakeware.
Aah ok. I assumed it was the same as our (rebar3/relx) scripts that does -- $@
or whatever.
from bakeware.
Related Issues (20)
- Missing `release` in `assembler` struct during bakeware.assemble HOT 2
- bakeware messes up ssl library? HOT 8
- adding rlwrap HOT 5
- Each build I make on Windows 10 prints "The system cannot find the path specified." when ran HOT 11
- How to call to running agent in production? HOT 5
- Only allow 1 app to run | Reuse the same .cache if appname is the same HOT 2
- Conflict with escript HOT 4
- Cache directory is not properly created automatically on first run.
- Error during `mix deps.compile` under Windows 10 HOT 4
- Windows executable is an empty file HOT 6
- Issue when home path contains spaces HOT 1
- Compilation error in CentOS 7.9
- Windows? HOT 2
- Include runtime NPM packages HOT 1
- Is it possible to setup a Windows Bakeware release in GitHub Actions? HOT 9
- Running on mobile devices? HOT 2
- Run the binary as PID 1 HOT 1
- [Knowledge share] Cross-compiling to Windows from Linux
- different behavior between with and without bakeware. HOT 3
- * (ArgumentError) unknown application: :bakeware HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bakeware.