Skip to content

Commit 681574e

Browse files
authored
fix: preview fallback path (#436)
* set preview falback path according to os * fix win path * fix lint errors
1 parent 5619d35 commit 681574e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

core/settings/Settings.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,18 @@ class Packages(object):
103103
if ENV == EnvironmentType.LIVE:
104104
__default_preview_folder = 'latest-official'
105105
PREVIEW_APP_ID = "org.nativescript.preview"
106-
PREVIEW_PATH = os.environ.get('preview_folder_path', os.path.join("/tns-dist", "Playground",
107-
"ns-play-dev", __default_preview_folder))
108-
PLAYGROUND_PATH = os.environ.get('playground_folder_path', os.path.join("/tns-dist", "Playground",
109-
"ns-play", __default_preview_folder))
106+
if os.name == 'nt':
107+
PREVIEW_PATH = os.environ.get('preview_folder_path',
108+
os.path.join("\\\\telerik.com\\distributions\\DailyBuilds\\NativeScript",
109+
"Playground", "ns-play-dev", __default_preview_folder))
110+
PLAYGROUND_PATH = os.environ.get('playground_folder_path',
111+
os.path.join("\\\\telerik.com\\distributions\\DailyBuilds\\NativeScript",
112+
"Playground", "ns-play", __default_preview_folder))
113+
else:
114+
PREVIEW_PATH = os.environ.get('preview_folder_path', os.path.join("/tns-dist", "Playground",
115+
"ns-play-dev", __default_preview_folder))
116+
PLAYGROUND_PATH = os.environ.get('playground_folder_path', os.path.join("/tns-dist", "Playground",
117+
"ns-play", __default_preview_folder))
110118

111119
PREVIEW_APP_IOS = os.path.join(PREVIEW_PATH, "nsplaydev.tgz")
112120
PREVIEW_APP_ANDROID = os.path.join(PREVIEW_PATH, "app-universal-release.apk")

0 commit comments

Comments
 (0)