Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Mar 22, 2022
1 parent 10cfd3a commit da2dc4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- **scoop-prefix:** Fix typo that breaks global installed apps ([#4795](https://github.com/ScoopInstaller/Scoop/issues/4795))
- **update:** Skip logs starting with `(chore)` ([#4800](https://github.com/ScoopInstaller/Scoop/issues/4800))
- **scoop-download:** Add failure check ([#4822](https://github.com/ScoopInstaller/Scoop/pull/4822))
- **install:** Fix issue with installation inside containers ([#4837](https://github.com/ScoopInstaller/Scoop/pull/4837))

### Code Refactoring

Expand Down
8 changes: 4 additions & 4 deletions lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ function link_current($versiondir) {
Remove-Item $currentdir -Recurse -Force -ErrorAction Stop
}

New-DirectoryJunction $currentdir $versiondir
New-DirectoryJunction $currentdir $versiondir | Out-Null
attrib $currentdir +R /L
return $currentdir
}
Expand Down Expand Up @@ -1207,7 +1207,7 @@ function persist_data($manifest, $original_dir, $persist_dir) {
# create link
if (is_directory $target) {
# target is a directory, create junction
New-DirectoryJunction $source $target
New-DirectoryJunction $source $target | Out-Null
attrib $source +R /L
} else {
# target is a file, create hard link
Expand Down Expand Up @@ -1276,9 +1276,9 @@ function test_running_process($app, $global) {
function New-DirectoryJunction($source, $target) {
# test if this script is being executed inside a docker container
if (Get-Service -Name cexecsvc -ErrorAction SilentlyContinue) {
cmd.exe /d /c "mklink /j `"$source`" `"$target`"" | Out-Null
cmd.exe /d /c "mklink /j `"$source`" `"$target`""
} else {
New-Item -Path $source -ItemType Junction -Value $target | Out-Null
New-Item -Path $source -ItemType Junction -Value $target
}
}

2 changes: 1 addition & 1 deletion lib/psmodules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function install_psmodule($manifest, $dir, $global) {
Remove-Item -Path $linkfrom -Force -ErrorAction SilentlyContinue
}

New-DirectoryJunction $linkfrom $dir
New-DirectoryJunction $linkfrom $dir | Out-Null
}

function uninstall_psmodule($manifest, $dir, $global) {
Expand Down

0 comments on commit da2dc4e

Please sign in to comment.