cellar create will now create ~/.local/share/cellar if it does not already exist
This commit is contained in:
parent
fec22d16f5
commit
8c9a66632c
@ -30,8 +30,10 @@ void cellar::bottles::create_bottle(int argc, vector<string> argv) {
|
|||||||
|
|
||||||
cmdparse.parse(argv);
|
cmdparse.parse(argv);
|
||||||
|
|
||||||
|
// sanity check: make sure ~/.local/share/cellar/bottles exists
|
||||||
string homepath = getenv("HOME");
|
string homepath = getenv("HOME");
|
||||||
|
if (!boost::filesystem::exists(homepath + "/.local/share/cellar/bottles")) { boost::filesystem::create_directories(homepath + "/.local/share/cellar/bottles"); }
|
||||||
|
|
||||||
string bottlechoice = bottlearg.getValue();
|
string bottlechoice = bottlearg.getValue();
|
||||||
string fullbottlepath;
|
string fullbottlepath;
|
||||||
if (bottlechoice.substr(0,1) == "/" || bottlechoice.substr(0,1) == ".") { // absolute or relative path
|
if (bottlechoice.substr(0,1) == "/" || bottlechoice.substr(0,1) == ".") { // absolute or relative path
|
||||||
|
Loading…
Reference in New Issue
Block a user