Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 2 #27

Merged
merged 2 commits into from
Sep 24, 2024
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: 7 additions & 6 deletions scripts/functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $progsToInstall = New-Object System.Collections.Generic.List[System.Object]
$dateNow = $((Get-Date).ToString('yyyy.MM.dd_hh.mm.ss'))
$logfileName = "logfile_$dateNow.log"
$powershellVersion = $host.Version.Major
$version = "1.5.19"
$version = "1.5.20"

# Paths
$logFolderPath = Join-Path $rootPath 'logs'
Expand Down Expand Up @@ -670,15 +670,17 @@ function autoInstall() {
# Check for all dependencies
checkDependencies

$chocoOnlyDep = $progsToInstall.contains("chocolatey") -and $progsToInstall.ToArray().Count -eq 1

# Check if dependencies are installed otherwise redirect user back to main menu
if ($progsToInstall.ToArray().Count -gt 0) {
if ($progsToInstall.ToArray().Count -gt 0 -and !$chocoOnlyDep) {
Clear-Host
writeToConsole "`n`tMissing dependencies, install all dependencies before proceeding: [$progsToInstall]" -logPath $LogPath
pause
Pause
return
}

cloneRepo
cloneRepo
patchFiles
buildRepo
moveGameFiles
Expand All @@ -689,7 +691,7 @@ function autoInstall() {
writeToConsole "`n`tYou're ready to start using SFSE mods!"
writeToConsole "`n`t`tCheck out the list of compatible mods here:
`n`t`thttps://github.com/gazzamc/starfield_hex_updater/blob/main/docs/compatibility"
pause
Pause
}
function setGamePaths() {
Clear-Host
Expand Down Expand Up @@ -724,7 +726,6 @@ function setGamePaths() {
$inputtedPathTrimmed = $inputtedPath.trim()

while ($continue) {

if (!$inputtedPathTrimmed -or !(fileExists $inputtedPathTrimmed)) {
if ($inputtedPathTrimmed -eq 'q') { exit }
writeToConsole $noPathMsg
Expand Down