Skip to content

CMD Line arguments for Config path. #82

@oldkingcone

Description

@oldkingcone
def get_config_path(config=''):
    path = ""
    # ToDo: Support for command line argument pointing to config file.
    if config == '':
        if is_posix():
            if os.path.isfile("/var/artillery/config"):
                path = "/var/artillery/config"
            if os.path.isfile("config"):
                path = "config"
        if is_windows():
            program_files = os.environ["ProgramFiles"]
            if os.path.isfile(program_files + "\\Artillery\\config"):
                path = program_files + "\\Artillery\\config"
    if config != '':
        if is_posix():
            if os.path.isfile(config):
                path = config
            if os.path.isfile(config):
                path = config
        if is_windows():
            program_files = os.environ["ProgramFiles"]
            if os.path.isfile(program_files + config):
                path = program_files + config
        

This is untested, but I am almost positive this will work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions