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

Read-Host halts scripts rather than prompt for input #219

Closed
ShaneIsrael opened this issue Mar 31, 2015 · 17 comments
Closed

Read-Host halts scripts rather than prompt for input #219

ShaneIsrael opened this issue Mar 31, 2015 · 17 comments

Comments

@ShaneIsrael
Copy link

What I have noticed happens when trying to add a Read-Host to my chocolateyInstall.ps1 is that it just stops the script on the Read-Host line and in the console displays the blinking underscore. However if you go to type, nothing shows up and you have to force exit the script.

For example, I had something like this:
$createShortcuts = Read-Host "Would you like shortcuts to be created? y/n"

This was just an added configuration step I was going to provide to the user as some people with my tool may or may not want shortcuts created. When testing that line in PowerShell it works like it should, but when running it through a script in Chocolatey it would seem output is being re-directed.

@ferventcoder
Copy link
Member

Did this work on older choco versions? if so I will tag this with Feature Parity

@ferventcoder ferventcoder added this to the 0.9.10 milestone Mar 31, 2015
@ferventcoder
Copy link
Member

This is related to #8, rather this should get implemented with it.

@ShaneIsrael
Copy link
Author

I am unsure if it worked on older versions. I have only ever had the latest release v0.9.9.2 I believe? This is also my first package I have been working at getting approved so my experience with choco has only been with v0.9.9.2.

@ferventcoder
Copy link
Member

Ah right on. I think it did. I have packages that would sort of prompt (they had a default choice with a timeout) and I think they worked

@ferventcoder
Copy link
Member

@ferventcoder
Copy link
Member

Think I got all of it right.

@ShaneIsrael
Copy link
Author

So then this is a bug? or was I just not going about it correctly?

@ferventcoder
Copy link
Member

Bug, Feature parity issue - is it high need or can it wait until I can implement with #8? I was working on that this morning and should have a beta coming out in the next couple of weeks that will have that in it.

@ShaneIsrael
Copy link
Author

It's not a high need at all. It's something that could be added in my next release which will probably be a couple weeks to a month after this first package gets through moderation.

@The1nternet
Copy link

This is an extremely urgent issue for me. All of our current private packages are broken until this is resolved.

@donaldr
Copy link

donaldr commented May 6, 2015

For me as well. Is it possible to install concurrent versions of chocolatey? I have included a dependencies in the nuspec for my package that points to a specific version of chocolatey, but since I already have chocolatey installed it doesn't seem to work.

@ferventcoder
Copy link
Member

@donaldr no, but it is possible to install the older version of choco if you need that. See https://github.com/chocolatey/chocolatey.org/issues/162

@The1nternet
Copy link

Is there like an update on this issue and such as?

@ferventcoder
Copy link
Member

Posh hosting is what I'm working on currently. Once that is done we should have beta builds of 0.9.10 with this in it. Once those are available, We can start testing what else is needed to make sure this works.

@ferventcoder
Copy link
Member

Looks like this is going to be fixed in 0.9.9.8.

@ferventcoder ferventcoder modified the milestones: 0.9.9.8, 0.9.10 Jun 21, 2015
@ferventcoder ferventcoder self-assigned this Jun 21, 2015
@ferventcoder
Copy link
Member

I'm seeing other fun possible issues but this is now working for me.

@ferventcoder
Copy link
Member

Bonus #56 is also working again.

ferventcoder added a commit that referenced this issue Jun 27, 2015
Allow PowerShell to use the same window as the choco process that
brings back the download progress bar and being able to do things like
read-host.
ferventcoder added a commit that referenced this issue Jun 27, 2015
* stable:
  (GH-341) Do not allow combining paths with colon
  (spec) don't allow interactive windows in specs
  (GH-219)(GH-56) Allow PowerShell interaction
  (spec) Set uninstall base scenario
  (GH-305) add warning if application not uninstalled

Conflicts:

src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs
	src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs
	src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs
	src/chocolatey/infrastructure/commands/CommandExecutor.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants