Skip to content

Commit

Permalink
refactor(config): Redirect set_config output to Out-Null
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed May 9, 2019
1 parent d0de794 commit ae9d802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions libexec/scoop-alias.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $command
# add alias to config
$aliases | Add-Member -MemberType NoteProperty -Name $name -Value $alias_file

set_config $script:config_alias $aliases
set_config $script:config_alias $aliases | Out-Null
}

function rm_alias($name) {
Expand All @@ -78,7 +78,7 @@ function rm_alias($name) {
rm_shim $aliases.$name (shimdir $false)

$aliases.PSObject.Properties.Remove($name)
set_config $script:config_alias $aliases
set_config $script:config_alias $aliases | Out-Null
} else {
abort "Alias $name doesn't exist."
}
Expand Down
6 changes: 3 additions & 3 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ $independent = $opt.i -or $opt.independent
$repo = $(get_config SCOOP_REPO)
if (!$repo) {
$repo = "https://github.com/lukesampson/scoop"
set_config SCOOP_REPO "$repo"
set_config SCOOP_REPO "$repo" | Out-Null
}

# Find current update channel from config
$branch = $(get_config SCOOP_BRANCH)
if (!$branch) {
$branch = "master"
set_config SCOOP_BRANCH "$branch"
set_config SCOOP_BRANCH "$branch" | Out-Null
}

if(($PSVersionTable.PSVersion.Major) -lt 5) {
Expand Down Expand Up @@ -143,7 +143,7 @@ function update_scoop() {
Pop-Location
}

set_config lastupdate ([System.DateTime]::Now.ToString('o'))
set_config lastupdate ([System.DateTime]::Now.ToString('o')) | Out-Null
success 'Scoop was updated successfully!'
}

Expand Down

0 comments on commit ae9d802

Please sign in to comment.