Skip to content

Conversation

steilerDev
Copy link

Gives the option to specify APPLE_ID_USER and APPLE_ID_PWD in the environment, to run this script non-interactively.

Fails if MFA is required non-interactively.

This is my first time touching D-lang - please let me know if this is not how it should be done :D

@steilerDev steilerDev mentioned this pull request Apr 22, 2024
if (!interactive) {
string appleId = environment.get("APPLE_ID_USER");
string password = environment.get("APPLE_ID_PWD");
if(interactive && (appleId is null || password is null)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably do an interactive || here, as if the interactive switch is given it's probably to make the prompt appear.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think && is the better choice, as we want the prompt only in interactive mode - if there is no interactive mode, don't prompt, but fail - otherwise you'd receive a prompt in an non-interactive session.

For my use case I want to use this in an autonomous scripting scenario - failing in case input is required is exactly what I want :D

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just interactive then?

@Dadoum
Copy link
Owner

Dadoum commented Apr 23, 2024

Otherwise your code is well-made

@Dadoum Dadoum force-pushed the main branch 2 times, most recently from c544aab to 77d51fc Compare May 17, 2024 01:28
@RoadRoller01
Copy link

Could we get an update on the status of this request? It's been a while since it was submitted, and it have not been merged yet.

Copy link

@saltman007web saltman007web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge

Lethaltail added a commit to Lethaltail/Sideloader that referenced this pull request Aug 6, 2025
Lethaltail added a commit to Lethaltail/Sideloader that referenced this pull request Aug 20, 2025
Implement the environment credential code (again) from Dadoum#40
Remove old fix 570a3a6 from steilerDev/Sideloader to allow merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants