Skip to content

Commit

Permalink
Don't enable electron logging by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sobo committed Aug 3, 2017
1 parent 03b631a commit b5bdf4a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
7 changes: 3 additions & 4 deletions atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ while getopts ":wtfvh-:" opt; do
foreground|benchmark|benchmark-test|test)
EXPECT_OUTPUT=1
;;
enable-electron-logging)
export ELECTRON_ENABLE_LOGGING=1
;;
esac
;;
w)
Expand All @@ -50,10 +53,6 @@ if [ $REDIRECT_STDERR ]; then
exec 2> /dev/null
fi

if [ $EXPECT_OUTPUT ]; then
export ELECTRON_ENABLE_LOGGING=1
fi

if [ $OS == 'Mac' ]; then
if [ -L "$0" ]; then
SCRIPT="$(readlink "$0")"
Expand Down
22 changes: 11 additions & 11 deletions resources/win/atom.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ SET WAIT=
SET PSARGS=%*

FOR %%a IN (%*) DO (
IF /I "%%a"=="-f" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-h" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--help" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-t" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--test" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--benchmark" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--benchmark-test" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-v" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--version" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-f" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-h" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--help" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-t" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--test" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--benchmark" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--benchmark-test" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="-v" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--version" SET EXPECT_OUTPUT=YES
IF /I "%%a"=="--enable-electron-logging" SET ELECTRON_ENABLE_LOGGING=YES
IF /I "%%a"=="-w" (
SET EXPECT_OUTPUT=YES
SET WAIT=YES
Expand All @@ -26,7 +27,6 @@ FOR %%a IN (%*) DO (
)

IF "%EXPECT_OUTPUT%"=="YES" (
SET ELECTRON_ENABLE_LOGGING=YES
IF "%WAIT%"=="YES" (
powershell -noexit "Start-Process -FilePath \"%~dp0\..\..\atom.exe\" -ArgumentList \"--pid=$pid $env:PSARGS\" ; wait-event"
exit 0
Expand Down

0 comments on commit b5bdf4a

Please sign in to comment.