mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2024-11-10 04:19:40 +00:00
Make init
repository option compliant
This commit is contained in:
parent
f5206602d7
commit
f79cdc95b8
1 changed files with 7 additions and 1 deletions
|
@ -74,10 +74,16 @@ pub async fn init() -> Result<()> {
|
|||
.with_prompt("Test command")
|
||||
.default("echo \"Error: no test specified\" && exit 1".into())
|
||||
.interact_text()?;
|
||||
let git_repository: String = Input::with_theme(&ColorfulTheme::default())
|
||||
let mut git_repository: String = Input::with_theme(&ColorfulTheme::default())
|
||||
.with_prompt("Git repository")
|
||||
.default(git_repo_url.unwrap_or_default())
|
||||
.interact_text()?;
|
||||
if !git_repository.is_empty() {
|
||||
// TODO: this doesn't handle SVN etc.
|
||||
if !git_repository.ends_with(".git") {
|
||||
git_repository.push_str(".git");
|
||||
}
|
||||
}
|
||||
let author: String = Input::with_theme(&ColorfulTheme::default())
|
||||
.with_prompt("Author name")
|
||||
.allow_empty(true)
|
||||
|
|
Loading…
Reference in a new issue