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

powershell and pwsh command discrepancy #124

Closed
rachmari opened this issue Sep 25, 2020 · 0 comments · Fixed by #213
Closed

powershell and pwsh command discrepancy #124

rachmari opened this issue Sep 25, 2020 · 0 comments · Fixed by #213
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team

Comments

@rachmari
Copy link
Contributor

What feature or product is affected?

Actions!

What is the new or expected behavior?

Corrected shell command details (I think)!

How is the old or inaccurate behavior currently documented?

We received a report from a user

the docs state the shell commands that they run https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell

for pwsh - pwsh -command "& '{0}'"
for powershell - powershell -command "& '{0}'".

however in runs it seems that the commands are not that example

/usr/bin/pwsh -command ". '{0}'"

So the difference seems to be . vs &? If you run this workflow:

name: check shell output
on:
  push:
jobs:
  pwsh:
    runs-on: windows-latest
    steps:
    - name: windows pwsh command
      shell: pwsh
      run: Write-Host 'Hello, World pwsh!'

  powershell:
    runs-on: windows-latest
    steps:
    - name: windows powershell command
      shell: powershell
      run: Write-Host 'Hello, World powershell!'

I think this is what you see in the log output for pwsh:

Run Write-Host 'Hello, World pwsh!'
  Write-Host 'Hello, World pwsh!'
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"

And for powershell:

Run Write-Host 'Hello, World powershell!'
  Write-Host 'Hello, World powershell!'
  shell: C:\windows\System32\WindowsPowerShell\v1.0\powershell.EXE -command ". '{0}'"

So -command ". '{0}'" in both cases but the docs shows -command "& '{0}'" in both cases?

Audience

Users who are building GitHub Actions workflows and using pwsh or powershell.

@janiceilene janiceilene transferred this issue from another repository Oct 6, 2020
@janiceilene janiceilene added the content This issue or pull request belongs to the Docs Content team label Oct 6, 2020
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 6, 2020
@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team and removed triage Do not begin working on this issue until triaged by the team labels Oct 6, 2020
casals added a commit to casals/docs that referenced this issue Oct 7, 2020
@zeke zeke added the windows label Oct 8, 2020
jnidzwetzki referenced this issue in jnidzwetzki/docs Oct 6, 2022
* Edit index

* Fix typos and reflow

* Editing config page.

* Edit config page.

* Edit timescaledb-tune

* Rename config file to about config

* Small edits to tune tool page

* Edit Postgres config

* Edit PostgreSQL config

* Edit Docker Config

* Add telemetry to index

* Edit telemetery

* Small syntax edits

* Fix bad link

* Update page-index.js

Adding in the new page to be able to view it for review.

* add procedure styling

Co-authored-by: Jacob Prall <prall.jacob@gmail.com>
Co-authored-by: Ryan Booz <ryan@timescale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants