Compare commits

..

1 Commits

Author SHA1 Message Date
a762bc96f7 asset-tool v0.4.7 user inventory 2024-10-01 11:40:32 -07:00

View File

@ -325,8 +325,8 @@ struct DownloadDecompileSubcommand{
struct DecompileHistoryIntoGitSubcommand{
#[arg(long)]
input_folder:PathBuf,
#[arg(long)]
output_folder:Option<PathBuf>,
//currently output folder must be the current folder due to git2 limitations
//output_folder:cli.output.unwrap(),
#[arg(long)]
style:Style,
#[arg(long)]
@ -351,8 +351,8 @@ struct DownloadAndDecompileHistoryIntoGitSubcommand{
cookie_envvar:Option<String>,
#[arg(long,group="cookie",required=true)]
cookie_file:Option<PathBuf>,
#[arg(long)]
output_folder:Option<PathBuf>,
//currently output folder must be the current folder due to git2 limitations
//output_folder:cli.output.unwrap(),
#[arg(long)]
style:Style,
#[arg(long)]
@ -590,7 +590,7 @@ async fn main()->AResult<()>{
git_committer_name:subcommand.git_committer_name,
git_committer_email:subcommand.git_committer_email,
input_folder:subcommand.input_folder,
output_folder:subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()),
output_folder:std::env::current_dir()?,
style:subcommand.style.rox(),
write_template:subcommand.write_template.unwrap_or(false),
write_models:subcommand.write_models.unwrap_or(false),
@ -605,7 +605,7 @@ async fn main()->AResult<()>{
subcommand.cookie_file,
).await?,
asset_id:subcommand.asset_id,
output_folder:subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()),
output_folder:std::env::current_dir()?,
style:subcommand.style.rox(),
write_template:subcommand.write_template.unwrap_or(false),
write_models:subcommand.write_models.unwrap_or(false),
@ -1266,11 +1266,11 @@ async fn write_commit(config:WriteCommitConfig,b:Result<AResult<(AssetVersion,ro
let sig=git2::Signature::new(config.git_committer_name.as_str(),config.git_committer_email.as_str(),&git2::Time::new(date.timestamp(),0)).unwrap();
let tree_id={
let mut tree_index = repo.index()?;
match tree_index.add_all(std::iter::once("*"),git2::IndexAddOption::DEFAULT,None){
match tree_index.add_all(std::iter::once(config.output_folder.as_path()),git2::IndexAddOption::DEFAULT,None){
Ok(_)=>(),
Err(e)=>println!("tree_index.add_all error: {}",e),
}
match tree_index.update_all(std::iter::once("*"),None){
match tree_index.update_all(std::iter::once(config.output_folder.as_path()),None){
Ok(_)=>(),
Err(e)=>println!("tree_index.update_all error: {}",e),
}