add descriptive output when creating templates
this includes a `welcomeText` attribute which can be set in the template, as well as outputing which files were created.
This commit is contained in:
@@ -728,6 +728,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
||||
else
|
||||
throw Error("file '%s' has unsupported type", from2);
|
||||
files.push_back(to2);
|
||||
notice("wrote: %s", to2);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -738,6 +739,11 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
||||
for (auto & s : files) args.push_back(s);
|
||||
runProgram("git", true, args);
|
||||
}
|
||||
auto welcomeText = cursor->maybeGetAttr("welcomeText");
|
||||
if (welcomeText) {
|
||||
notice("\n----------\n");
|
||||
notice(welcomeText->getString());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user