Skip to content

Commit

Permalink
Cleanup stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclary committed Sep 8, 2024
1 parent d44bb3c commit 17563f8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
14 changes: 8 additions & 6 deletions .github/scripts/installer_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ check_prefix() {
fi

if [[ -d "$base_prefix" ]]; then
echo "\nContents of ${base_prefix}:"
echo -e "\nContents of ${base_prefix}:"
ls -al $base_prefix
else
echo "Base prefix does not exist!"
Expand All @@ -49,15 +49,16 @@ check_shortcut() {
shortcut=$($pythonexe $menuinst shortcut --mode=user)
if [[ -e "${shortcut}" ]]; then
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "\n${shortcut}/Contents/MacOS contents:"
echo -e "\nContents of ${shortcut}/Contents/MacOS:"
ls -al "${shortcut}/Contents/MacOS"
echo -e "\n$shortcut/Contents/Info.plist contents:"
echo -e "\nContents of $shortcut/Contents/Info.plist:"
cat "${shortcut}/Contents/Info.plist"
script=$(compgen -G "${shortcut}/Contents/MacOS/spyder"*-script)
echo -e "\n${script} contents:"
echo -e "\nContents of ${script}:"
cat "${script}"
echo ""
elif [[ "$OSTYPE" == "linux"* ]]; then
echo -e "\n${shortcut} contents:"
echo -e "\nContents of ${shortcut}:"
cat $shortcut
fi
else
Expand All @@ -69,7 +70,7 @@ check_shortcut() {
check_spyder_version() {
runtime_python=${base_prefix}/envs/spyder-runtime/bin/python
actual_version=$(${runtime_python} -c "import spyder; print(spyder.__version__)")
echo "Expected version = ${SPYVER}"
echo -e "\nExpected version = ${SPYVER}"
echo "Actual version = ${actual_version}"
if [[ "${SPYVER}" != "${actual_version}" ]]; then
echo "Error: installed Spyder version is incorrect!"
Expand All @@ -78,6 +79,7 @@ check_spyder_version() {
}

install || exit 1
echo -e "\n#############"
echo "Install info:"
check_prefix
check_uninstall
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/installers-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,26 @@ jobs:
run: |
set base_prefix=%USERPROFILE%\AppData\Local\spyder-6
start /wait %PKG_PATH% /InstallationType=JustMe /NoRegistry=1 /S
if exist %base_prefix%\install.log type %base_prefix%\install.log
echo.
if exist %base_prefix%\install.log (
echo Log output:
type %base_prefix%\install.log
) else (
echo No log found at %base_prefix%\install.log
)
set mode=system
for /F "tokens=*" %%i in (
'%base_prefix%\python %base_prefix%\Scripts\menuinst_cli.py shortcut --mode=%mode%'
) do (
set shortcut=%%~fi
)
echo.
if exist "%shortcut%" (
echo "Spyder installed successfully"
echo Spyder installed successfully
) else (
echo "Spyder NOT installed successfully"
echo Spyder NOT installed successfully
EXIT /B 1
)
Expand All @@ -302,6 +310,7 @@ jobs:
) do (
set actual_version=%%~i
)
echo.
echo Expected version = %SPYVER%
echo Actual version = %actual_version%
if %SPYVER% neq %actual_version% (
Expand Down

0 comments on commit 17563f8

Please sign in to comment.