Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputTask does not wait user input via composer task scripts #1776

Open
dragomano opened this issue Dec 17, 2023 · 6 comments
Open

InputTask does not wait user input via composer task scripts #1776

dragomano opened this issue Dec 17, 2023 · 6 comments

Comments

@dragomano
Copy link

Describe the bug
My build has a simple input with InputTask:

<?xml version="1.0" encoding="UTF-8" ?>

<project name="Test" default="build">
  <target name="build">
    <input message="What is your release type?" propertyName="release.type" defaultValue="thesame" validargs="thesame,major,minor,bugfix" />
    <echo message="Release type: ${release.type}" />
  </target>
</project>

When I am running "vendor/bin/phing" via composer script - composer run build, user input does not work, it's skipped.

Steps To Reproduce
Add "vendor/bin/phing" to composer scripts section:

{
  "require-dev": {
    "phing/phing": "3.*"
  },
  "minimum-stability": "alpha",
  "scripts": {
    "build": "vendor/bin/phing"
  }
}

Then run composer run build in your console.

Expected behavior
I want to get the same result from both commands: composer run build and vendor/bin/phing.

Screenshots / terminal output
composer run build:

sshot-13

vendor/bin/phing:

sshot-14

Additional context
Phing 3.0.0-rc6
Composer 2.6.5
PHP 8.2.13

@mrook
Copy link
Member

mrook commented Feb 11, 2024

I'm unable to reproduce this (PHP 8.3.1). Phing prompts in both cases.

@dragomano
Copy link
Author

It's not a matter of whether it prompts or not, it's a matter of whether it waits for the user's response (input) in one case, and just automatically selects the default answer and completes the input itself without waiting for the user in the other case.

@mrook
Copy link
Member

mrook commented Feb 11, 2024

That's what I mean, in both cases I get a prompt which waits for input.

@dragomano
Copy link
Author

There must be a problem with something else. For example, in Windows.

@mrook
Copy link
Member

mrook commented Feb 11, 2024

Could be. I don't have access to a Windows machine so I can't confirm that (or write a fix).

@mrook
Copy link
Member

mrook commented Sep 4, 2024

@dragomano can you debug this further on Windows? And possibly provide a fix? Otherwise I'll have to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants