Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion public/sfEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@ function Test-NpmSetup{

function Install-SfClient{
[CmdletBinding(SupportsShouldProcess)]
param()
param(
[Parameter()][switch]$Force
)

# Run installaltion if Force is set
# This command allows to update the Salesforce CLI if already installed
if($Force){
"Installing Salesforce CLI using npm..." | Write-MyHost
Invoke-MyCommand -Command SfCliInstall
}

# Check if npm is installed

# Check and Install for Salesforce CLI installed and install if not
$sfversion = Invoke-MyCommand -Command SfCliVersion -ErrorAction SilentlyContinue
Expand Down
Loading