瀏覽代碼

cli: Fix program deploy path for camelcased directory names (#939)

Tom Linton 3 年之前
父節點
當前提交
8467491a56
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      cli/src/config.rs

+ 5 - 2
cli/src/config.rs

@@ -2,6 +2,7 @@ use anchor_client::Cluster;
 use anchor_syn::idl::Idl;
 use anyhow::{anyhow, Error, Result};
 use clap::{ArgEnum, Clap};
+use heck::SnakeCase;
 use serde::{Deserialize, Serialize};
 use solana_sdk::pubkey::Pubkey;
 use solana_sdk::signature::{Keypair, Signer};
@@ -68,14 +69,16 @@ impl Manifest {
                 .name
                 .as_ref()
                 .unwrap()
-                .to_string())
+                .to_string()
+                .to_snake_case())
         } else {
             Ok(self
                 .package
                 .as_ref()
                 .ok_or_else(|| anyhow!("package section not provided"))?
                 .name
-                .to_string())
+                .to_string()
+                .to_snake_case())
         }
     }