question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Powershell Prompt Double Execution

See original GitHub issue

From @whatevergeek on August 18, 2016 18:44

Version: powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb Platform: Ubuntu 14.04

Steps to reproduce

  1. Modify $profile file and add the following function inside function prompt { Write-Host (“This>”) return " " }
  2. Exit and re-enter powershell
  3. Check the commandline prompt

Expected behavior

It should only print “This>” once.

Actual behavior

It prints “This>” twice.

Environment data

> $PSVersionTable
Name                           Value                                                                 
----                           -----                                                                 
PSVersion                      6.0.0-alpha                                                           
PSEdition                      Core                                                                  
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                               
BuildVersion                   3.0.0.0                                                               
GitCommitId                    v6.0.0-alpha.9                                                        
CLRVersion                                                                                           
WSManStackVersion              3.0                                                                   
PSRemotingProtocolVersion      2.3                                                                   
SerializationVersion           1.1.0.1       

Copied from original issue: PowerShell/PowerShell#1897

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:43 (27 by maintainers)

github_iconTop GitHub Comments

1reaction
lzybkrcommented, Nov 4, 2017

I’ll have an official prerelease build out next week if you want to verify this is fixed, otherwise you can grab a build out of appveyor here.

0reactions
pcgeek86commented, Nov 17, 2017

@SteveL-MSFT Cool, thank you for calling that out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to make a PowerShell script work by double ...
cmd file from explorer or run the .cmd from a command prompt. I use the same base name because the .cmd file will...
Read more >
How do I run multiple commands on one line in PowerShell?
Use a semicolon to chain commands in PowerShell: ipconfig /release; ipconfig /renew.
Read more >
PowerShell prompt to continue execution of code
Another simple solution would be to use: Read-Host -Prompt "Press any key to continue or CTRL+C to quit" | Out-Null.
Read more >
about Prompts - PowerShell
Built-in prompt ... PowerShell includes a built-in Prompt function. ... If $PSDebugContext isn't populated, the function adds PS to the prompt. And, the...
Read more >
Always automatically execute PowerShell script *.ps1 by ...
Is there really to way to make an execution easier? I can imagine that there is a solution to automatically (!) pass the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found