Skip to content

feat: make install.sh curl-pipeable with non-interactive support#3

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-d888b3fc-f834-4c12-806d-b4ed6b59790c
Closed

feat: make install.sh curl-pipeable with non-interactive support#3
Copilot wants to merge 1 commit intomainfrom
copilot/fix-d888b3fc-f834-4c12-806d-b4ed6b59790c

Conversation

Copy link

Copilot AI commented Sep 7, 2025

Problem

The existing install.sh script required interactive user confirmation, making it incompatible with the common curl script | sh installation pattern that many users expect for quick setup.

Solution

Added comprehensive non-interactive support while preserving all existing functionality and safety checks:

Auto-Detection

The script now automatically detects when it's being run via pipe (when stdin is not a terminal) and skips the confirmation prompt:

# Now works seamlessly
curl -fsSL https://raw.githubusercontent.com/tr1xem/flux/main/install.sh | sh

Multiple Non-Interactive Options

  • Command line flags: --yes, --force, --non-interactive
  • Environment variable: FLUX_AUTO_INSTALL=1
  • Help system: --help flag with usage information

Usage Examples

# Direct curl installation (the main requested feature)
curl -fsSL https://raw.githubusercontent.com/tr1xem/flux/main/install.sh | sh

# Explicit non-interactive flag
./install.sh --yes

# Environment variable for automation
FLUX_AUTO_INSTALL=1 ./install.sh

# Help and usage information
./install.sh --help

Implementation Details

  • Minimal changes: Only 43 lines added to maintain simplicity
  • Backwards compatible: Existing interactive mode unchanged
  • Smart detection: Uses [[ ! -t 0 ]] to detect piped input
  • Safe: All existing safety checks preserved (OS detection, root user check, etc.)
  • Comprehensive: Multiple methods for different use cases

Documentation

Updated README with installation section showing all available methods and options, making it clear how users can quickly install Flux with a single command.

The script now intelligently adapts to its execution context while maintaining all security and functionality requirements.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@tr1xem tr1xem closed this Sep 7, 2025
Copilot AI changed the title [WIP] any way to imporve this ? so that i could directly curl script | sh it feat: make install.sh curl-pipeable with non-interactive support Sep 7, 2025
Copilot AI requested a review from tr1xem September 7, 2025 10:39
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.

2 participants