Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 22, 2025

Problem

The pint and pint-test wrapper scripts were hardcoded to only pass specific arguments (--config and --test) to the underlying Laravel Pint executable, ignoring any additional command-line arguments provided by users.

This meant users couldn't leverage Laravel Pint's full functionality through the wrapper scripts. For example, these commands would ignore the additional arguments:

# These arguments were being ignored
./pint --verbose                    # Verbose output ignored
./pint --dry-run                    # Dry run mode ignored  
./pint app/Models                   # Target directory ignored
./pint-test --verbose app/Controllers  # Both args ignored

Solution

Modified both wrapper scripts to accept and seamlessly pass through all command-line arguments using bash's "$@" parameter expansion:

Before:

$PINT_EXECUTABLE --config="$CONFIG_FILE"
$PINT_EXECUTABLE --test --config="$CONFIG_FILE"

After:

$PINT_EXECUTABLE --config="$CONFIG_FILE" "$@"
$PINT_EXECUTABLE --test --config="$CONFIG_FILE" "$@"

Usage Examples

Users can now pass any Laravel Pint arguments through the wrapper scripts:

# Verbose output
./pint --verbose

# Dry run to preview changes
./pint --dry-run

# Target specific directories
./pint app/Models
./pint-test app/Controllers tests/

# Combine multiple options
./pint --verbose --dry-run app/

The wrapper scripts maintain their core functionality (automatic config file detection and validation) while now supporting the full range of Laravel Pint's command-line options.

Documentation

Updated the README.md with examples showing how to use additional arguments with both wrapper scripts, making the new functionality discoverable for users.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/laravel/pint/zipball/0345f3b05f136801af8c339f9d16ef29e6b4df8a
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/VBjgBz /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 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.

Co-authored-by: williamrenfrew <12625062+williamrenfrew@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Can we allow the main pint executable wrapper be able to take args and pass them through seamlessly Allow pint wrapper scripts to accept and pass through command-line arguments Aug 22, 2025
@Copilot Copilot AI requested a review from williamrenfrew August 22, 2025 19:01
Copilot finished work on behalf of williamrenfrew August 22, 2025 19:01
@williamrenfrew williamrenfrew marked this pull request as ready for review August 23, 2025 08:13
@williamrenfrew williamrenfrew merged commit 6cfdaba into simplify Aug 23, 2025
@williamrenfrew williamrenfrew deleted the copilot/fix-6303c8d6-9a22-499c-84fb-e86f05268e88 branch August 23, 2025 13:11
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.

3 participants