Skip to content

Commit

Permalink
fix some obvious bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarmos-san committed Aug 18, 2023
1 parent 0f9e6eb commit d82ea5e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup-rewrite
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def install_system_essentials() -> None:
pass


def install_homebrew(dry_run: bool) -> None:
def install_homebrew(dry_run: bool = True) -> None:
"""Install HomeBrew on MacOS and Ubuntu/Debian systems."""
homebrew_installation_url = (
"https://raw.githubusercontent.com/Homebrew/install/master/install.sh"
Expand All @@ -130,7 +130,9 @@ def install_homebrew(dry_run: bool) -> None:
# Install Homebrew only for MacOS and Ubuntu/Debian systems
if platform.system() == "MacOS" or platform.system() == "Linux":
try:
subprocess.run(["/bin/bash", "-c", f'$"({curl_command})"'])
subprocess.run(
["NONINTERACTIVE=1 ", "/bin/bash", "-c", f'$"({curl_command})"']
)
except subprocess.CalledProcessError as error:
print(f"Failed to install Homebrew: {error}")
else:
Expand All @@ -147,9 +149,11 @@ def main() -> None:

if not args.dry_run:
run_system_updates(dry_run=False)
install_homebrew(dry_run=False)
else:
print('Running script in "dry" mode...')
run_system_updates()
install_homebrew()


if __name__ == "__main__":
Expand Down

0 comments on commit d82ea5e

Please sign in to comment.