Skip to content

Commit

Permalink
feat(scoop): remove option due to not correctly supporting MSI
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Nov 26, 2024
1 parent 5ba9ffb commit e139f5e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 144 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/microsoft_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
version:
description: 'The latest version'
required: true
release:
description: 'The release id'
required: false

jobs:
microsoft_store:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
needs: package
strategy:
matrix:
workflow: [winget, microsoft_store, scoop]
workflow: [winget, microsoft_store]
steps:
- name: Notify 🙋🏾‍♀️
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
Expand All @@ -70,5 +70,5 @@ jobs:
repo: '${{ github.event.repository.name }}',
workflow_id: '${{ matrix.workflow }}.yml',
ref: 'main',
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', ''), "release": "${{ github.event.release.id }}" }
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
})
42 changes: 0 additions & 42 deletions .github/workflows/scoop.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
version:
description: 'The latest version'
required: true
release:
description: 'The release id'
required: false

jobs:
publish:
Expand Down
30 changes: 0 additions & 30 deletions packages/scoop/build.ps1

This file was deleted.

29 changes: 0 additions & 29 deletions packages/scoop/oh-my-posh.json

This file was deleted.

17 changes: 5 additions & 12 deletions src/runtime/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,27 +359,20 @@ func (term *Terminal) Shell() string {
if len(term.CmdFlags.Shell) != 0 {
return term.CmdFlags.Shell
}

log.Debug("no shell name provided in flags, trying to detect it")

pid := os.Getppid()
p, _ := process.NewProcess(int32(pid))

name, err := p.Name()
if err != nil {
log.Error(err)
return UNKNOWN
}

log.Debug("process name: " + name)
// this is used for when scoop creates a shim, see
// https://github.com/jandedobbeleer/oh-my-posh/issues/2806
executable, _ := os.Executable()
if name == executable {
p, _ = p.Parent()
name, err = p.Name()
log.Debug("parent process name: " + name)
}
if err != nil {
log.Error(err)
return UNKNOWN
}

// Cache the shell value to speed things up.
term.CmdFlags.Shell = strings.Trim(strings.TrimSuffix(name, ".exe"), " ")
return term.CmdFlags.Shell
Expand Down
23 changes: 1 addition & 22 deletions website/docs/installation/windows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ When using oh-my-posh inside the WSL, make sure to follow the [Linux][linux] ins
:::

<a href="https://apps.microsoft.com/detail/xp8k0hkjfrxgck?mode=mini" target="_blank">
<ThemedImage
<ThemedImage
alt="msstore"
width="232"
height="68"
Expand All @@ -40,7 +40,6 @@ When using oh-my-posh inside the WSL, make sure to follow the [Linux][linux] ins
groupId="install"
values={[
{ label: 'winget', value: 'winget', },
{ label: 'scoop', value: 'scoop', },
{ label: 'manual', value: 'manual', },
{ label: 'chocolatey', value: 'chocolatey'},
]
Expand All @@ -53,15 +52,6 @@ Open a PowerShell prompt and run the following command:
winget install JanDeDobbeleer.OhMyPosh -s winget
```

</TabItem>
<TabItem value="scoop">

Open a PowerShell prompt and run the following command:

```powershell
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
```

</TabItem>
<TabItem value="manual">

Expand Down Expand Up @@ -123,7 +113,6 @@ Exclusions should be added with the full path to the executable, you can get it
groupId="install"
values={[
{ label: 'winget', value: 'winget', },
{ label: 'scoop', value: 'scoop', },
{ label: 'manual', value: 'manual', },
{ label: 'chocolatey', value: 'chocolatey'},
]
Expand All @@ -136,15 +125,6 @@ Open a PowerShell prompt and run the following command:
winget upgrade JanDeDobbeleer.OhMyPosh -s winget
```

</TabItem>
<TabItem value="scoop">

Open a PowerShell prompt and run the following command:

```powershell
scoop update oh-my-posh
```

</TabItem>
<TabItem value="manual">

Expand Down Expand Up @@ -179,7 +159,6 @@ for the prompt initialization in PowerShell.


[fonts]: /docs/installation/fonts
[scoop]: https://scoop.sh/
[wt]: https://github.com/microsoft/terminal
[linux]: /docs/installation/linux
[themes]: /docs/themes
Expand Down
2 changes: 1 addition & 1 deletion website/docs/migrating-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" |
Replace `jandedobbeleer.omp.json` with the theme you use.

:::caution
Only winget and scoop add the environment variable `POSH_THEMES_PATH` automatically. For Homebrew, use
Only winget and the Windows Store add the environment variable `POSH_THEMES_PATH` automatically. For Homebrew, use
`$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json`.
:::

Expand Down

0 comments on commit e139f5e

Please sign in to comment.