Skip to content

Commit

Permalink
Update dotfiles script
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyTake-Off committed Oct 11, 2024
1 parent b2e0f1c commit 64236ce
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions winfiles/.dots/scripts/set-dotfiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ function Invoke-DotfilesClone {
$output = git --git-dir=$dotfilesPath --work-tree=$HOME pull origin $branchName

if ($output -match 'Already up to date.') {
Write-ColoredMessage 'Dotfiles up to date' 'green'
Write-ColoredMessage 'Already up to date.' 'green'
return $true
}
}
}
Expand Down Expand Up @@ -149,9 +150,11 @@ function Set-ConfigurationFiles {
# Main execution logic
try {
if (-not $SkipClone) {
Invoke-DotfilesClone
if (Invoke-DotfilesClone) {
return
}
} else {
Write-ColoredMessage 'Skipping cloning of dotfiles.' 'yellow'
Write-ColoredMessage 'Skipping dotfiles cloning' 'yellow'
}

if (-not (Test-Path -Path $dotsFilesPath -PathType Container)) {
Expand All @@ -160,7 +163,7 @@ try {

Write-ColoredMessage 'Setting up configuration files...' 'yellow'
Set-ConfigurationFiles
Write-ColoredMessage 'Dotfiles setup complete.' 'green'
Write-ColoredMessage 'Dotfiles setup complete' 'green'
} catch {
throw "Error in line $($_.InvocationInfo.ScriptLineNumber): $($_.Exception.Message)"
} finally {
Expand Down

0 comments on commit 64236ce

Please sign in to comment.