NobbZ

NobbZ

I hit the reply button of the op, but since this is not a threaded view, you can’t tell the difference in many cases. But yes I should have written “you shouldn’t use its functions”.

1
Post #11
easco

easco OP

FWIW, this is not code the is going into production. I’m running a “.exs” script and I want it to make use of the code embodied a mix project so I’ve got my script in the same folder hierarchy as that mix project and I’m using iex -S mix my_script.exs to run things. It kicks off and starts the mix project and all it’s applications, then calls my script.

I wil be running the script in front of an audience, however, and I didn’t want my password to be displayed in Plain Text. So:

  1. This is a development context, not production code
  2. I know I will be running my code through mix (so Mix.Shell.IO is fine to use)
  3. Calling an undocumented function doesn’t bother me for this use case.

For this purpose :io.get_password() does what I need it to do. I gather that it may not be a good general-purpose solution so caveat emptor.

4
Post #12
— All posts loaded —