Skip to content

Commit 7637574

Browse files
committed
On startup, attempt to set the working directory to $HOME.
Fixes #913581.
1 parent 2d1a2aa commit 7637574

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Mac/OSX/PythonLauncher/main.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
//
88

99
#import <Cocoa/Cocoa.h>
10+
#include <unistd.h>
1011

1112
int main(int argc, const char *argv[])
1213
{
14+
char *home = getenv("HOME");
15+
if (home) chdir(home);
1316
return NSApplicationMain(argc, argv);
1417
}

0 commit comments

Comments
 (0)