Fix starting skillstest via start-mycroft.sh
This also removes the ability to pass the skills dir as the first argument. Instead this was moved to an environment variable called SKILLS_DIR to prevent conflict with pytest argumentspull/1619/head
parent
7624b33d5e
commit
cc582ce38c
|
@ -17,7 +17,6 @@ import pytest
|
|||
import glob
|
||||
import os
|
||||
from os.path import exists, join, expanduser
|
||||
import sys
|
||||
import imp
|
||||
|
||||
from mycroft.configuration import Configuration
|
||||
|
@ -64,11 +63,13 @@ def discover_tests(skills_dir):
|
|||
|
||||
|
||||
def get_skills_dir():
|
||||
if len(sys.argv) > 1:
|
||||
return expanduser(sys.argv[-1])
|
||||
|
||||
return expanduser(join(Configuration.get()['data_dir'],
|
||||
Configuration.get()['skills']['msm']['directory']))
|
||||
return (
|
||||
expanduser(os.environ.get('SKILLS_DIR', '')) or
|
||||
expanduser(join(
|
||||
Configuration.get()['data_dir'],
|
||||
Configuration.get()['skills']['msm']['directory']
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
skills_dir = get_skills_dir()
|
||||
|
|
Loading…
Reference in New Issue