easco
The Mix.Shell.IO module allows me to prompt the user for some information. I would like to use that functionality in a script I am writing to prompt the user for a password. Unfortunately it displays the user’s entry in cleartext on the screen.
I don’t see any way to entice that function to mask the input at the moment.
Is there another Erlang/Elixir function that might help me accomplish the same effect? For that matter, is there a shell command I could use with Mix.Shell.IO.cmd to collect a masked string and return it?
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Don’t know how to turn off echo’ing offhand, but I know the
hex.publishtakes a password that it immediately deletes as it is typed, maybe take a look at it’s code?easco
I discovered that there is an undocumented function
:io.get_password()that reads input from the shell without echoing it and returns a password. That seems to be what I need ([erlang-questions] Getting a password from escript / I/O server introduction)My code now reads:
For others looking to this solution, read the rest of the thread. This was a solution for me in one context, but may not be general purpose solution.
NobbZ
Unless you are developing something to integrate with mix, you should not use it. It is usually not included in production builds and will probably fail then.
hassan
“usually not” based on what? It seems to be in my production builds.
NobbZ
Then you either have mix mentioned in your
(extra_)applications-list, or you are running you generated application on a machine that has elixir installed.hassan
Nope.
“Elixir” or Erlang? It’s present on a system without Elixir but with
Erlang installed, but – I thought the whole point of a release was to
use the bundled version.
NobbZ
Just search the forum, there are plenty of threads because mix is not available in production or release. Its always suggested to not rely on
mixwhen not in build time.So if you have a proper release and access to mix, its probably a bug, so could you please explain how you built and run the release?
hassan
Who is talking about mix?!
The OP mentioned finding an undocumented function :io.get_password()
and you responded with:
“It is usually not included in production builds…”
So maybe in the future be more specific what you mean by “it”?
NobbZ
The OP… The subject… The code example…
Or do you want to say, that
Mix.Shell.IOis not part ofmix?Also I said:
All “it”s are clearly refering to
mixthat I mentioned in the very same paragraph. Nothing there seems to be related to:io-module.hassan
You didn’t reply to the first post, but to the one that starts out
mentioning finding the :io.get_password() function.
They definitely weren’t “clearly” referring to Mix from my reading, or
I wouldn’t have had the question I did.
And if we replace “it” in your statement with “mix”,
Unless you are developing something to integrate with mix, you
should not use mix.
That doesn’t seem meaningful to me