Make it possible to start a sky app in an arbitrary relative path, rather than requiring the dart file to be in the current directory.

This commit is contained in:
Ian Fischer
2015-09-08 17:13:41 -07:00
parent 9fcdce393a
commit caa7af00fe

View File

@@ -248,9 +248,7 @@ class StartSky(object):
main_dart = os.path.join(project_or_path, 'lib', 'main.dart')
missing_msg = 'Missing lib/main.dart in project: %s' % project_or_path
else:
# FIXME: This assumes the path is at the root of the project!
# Instead we should walk up looking for a pubspec.yaml
sky_server_root = os.path.dirname(project_or_path)
sky_server_root = os.getcwd()
main_dart = project_or_path
missing_msg = '%s does not exist.' % main_dart