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 glob
|
||||||
import os
|
import os
|
||||||
from os.path import exists, join, expanduser
|
from os.path import exists, join, expanduser
|
||||||
import sys
|
|
||||||
import imp
|
import imp
|
||||||
|
|
||||||
from mycroft.configuration import Configuration
|
from mycroft.configuration import Configuration
|
||||||
|
@ -64,11 +63,13 @@ def discover_tests(skills_dir):
|
||||||
|
|
||||||
|
|
||||||
def get_skills_dir():
|
def get_skills_dir():
|
||||||
if len(sys.argv) > 1:
|
return (
|
||||||
return expanduser(sys.argv[-1])
|
expanduser(os.environ.get('SKILLS_DIR', '')) or
|
||||||
|
expanduser(join(
|
||||||
return expanduser(join(Configuration.get()['data_dir'],
|
Configuration.get()['data_dir'],
|
||||||
Configuration.get()['skills']['msm']['directory']))
|
Configuration.get()['skills']['msm']['directory']
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
skills_dir = get_skills_dir()
|
skills_dir = get_skills_dir()
|
||||||
|
|
Loading…
Reference in New Issue