CloudSlang / cloud-slang

CloudSlang Language, CLI and Builder
http://cloudslang.io
Apache License 2.0
235 stars 82 forks source link

Add base dir for working folder at cli config level #638

Open andreivasiletruta opened 8 years ago

andreivasiletruta commented 8 years ago

Add a base dir option for one to configure the current "authoring working folder" so that all command will relate to it.

It will help reduce redundancy of data being inputted to the cslang commands. Check below data for redundancy.

cslang>run --f C:\Work\ProductRelated\CAT\@CloudSlang\tutorials\hiring\new_hire.sl --cp C:\Work\ProductRelated\CAT\@CloudSlang\tutorials\base

lucian-cm commented 8 years ago

@andreivasiletruta I think this is a great addition. Btw, did you try reading an enviroment variable directly in the command?

levice14 commented 8 years ago

it can be added to the config file configuration/cslang.properties

andreivasiletruta commented 8 years ago

@lucian-cm I did not try to use environment variable. I guess it could work; having it in the cslang.properties will help though 👍 .

lucian-cm commented 8 years ago

@Bonczidai @andreivasiletruta requesting an additional clarification: Considering we have this variable, the intention is to resolve relative paths in the CLI command arguments against the base path. Do we also plan to also resolve path like inputs for certain operations (like fs operations) against this base path? I think this might be tricky at this point as there is no good way to tell which input denotes a path.

levice14 commented 8 years ago

I think we can go with CLI relative paths