Skip to content

Commit

Permalink
Why isn't post-install script stdout sent to install.log?
Browse files Browse the repository at this point in the history
Why is install.log on CI so concise?
Try sending post-install output to another logfile
  • Loading branch information
mrclary committed Nov 6, 2024
1 parent 2011f07 commit 496bda1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/installer_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install() {
tail -F /var/log/install.log & tail_id=$!
trap "kill -s TERM $tail_id" EXIT

installer -pkg $PKG_PATH -target CurrentUserHomeDirectory >/dev/null
CI=true installer -pkg $PKG_PATH -target CurrentUserHomeDirectory >/dev/null
elif [[ "$OSTYPE" == "linux"* ]]; then
$PKG_PATH -b
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/installers-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ jobs:
if exist %base_prefix%\install.log (
echo Log output:
type %base_prefix%\install.log
type %base_prefix%\user-post-install.log
) else (
echo No log found at %base_prefix%\install.log
)
Expand Down
10 changes: 10 additions & 0 deletions installers-conda/resources/post-install.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
@rem This script launches Spyder after install
@echo off

call :redirect 2>&1 > %PREFIX%\user-post-install.log

:redirect
set

if "%CI%"=="1" set no_launch_spyder=true
if "%INSTALLER_UNATTENDED%"=="1" set no_launch_spyder=true
@echo CI = %CI%
@echo INSTALLER_UNATTENDED = %INSTALLER_UNATTENDED%
@echo no_launch_spyder = %no_launch_spyder%
if defined no_launch_spyder (
@echo Installing in CI or silent mode, do not launch Spyder
exit /b %errorlevel%
) else (
@echo Launching Spyder after install completed.
)

set mode=system
Expand Down

0 comments on commit 496bda1

Please sign in to comment.