Skip to content

Commit e7deb5d

Browse files
committed
fix: referenced before assignment in tns_assert.py
1 parent 177c6f0 commit e7deb5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

products/nativescript/tns_assert.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def created(app_name, output=None, app_data=None, path=Settings.TEST_RUN_HOME, w
1919
:param output: Console output of `tns create` command.
2020
:param app_data: AppInfo object.
2121
:param path: Base path where app is created.
22+
:param webpack: If true it will verify webpack plugin is installed.
2223
:param theme: If true it will verify default {N} theme is installed.
2324
"""
2425
# Assert app exists
@@ -43,8 +44,8 @@ def created(app_name, output=None, app_data=None, path=Settings.TEST_RUN_HOME, w
4344
assert Folder.exists(os.path.join(node_path, 'nativescript-theme-core')), '{N} theme do not exists.'
4445

4546
# Verify webpack is installed
47+
before_watch_hooks = os.path.join(app_path, 'hooks', 'before-watch')
4648
if webpack:
47-
before_watch_hooks = os.path.join(app_path, 'hooks', 'before-watch')
4849
assert Folder.exists(os.path.join(node_path, 'nativescript-dev-webpack')), 'Webpack not installed in app.'
4950
assert File.exists(os.path.join(app_path, 'webpack.config.js')), 'Missing webpack config.'
5051
assert File.exists(os.path.join(before_watch_hooks, 'nativescript-dev-webpack.js')), 'Hooks not installed.'

0 commit comments

Comments
 (0)