This commit is contained in:
Leo Kettmeir 2025-07-07 14:41:36 +02:00
parent ee04ca62fd
commit 2025c978eb
No known key found for this signature in database
GPG key ID: A82C9D461FC483E8
3 changed files with 15 additions and 8 deletions

View file

@ -787,7 +787,10 @@ async fn initialize_tunnel(
let factory = CliFactory::from_flags(Arc::new(flags.clone())); let factory = CliFactory::from_flags(Arc::new(flags.clone()));
let cli_options = factory.cli_options()?; let cli_options = factory.cli_options()?;
let deploy_config = cli_options.start_dir.to_deploy_config()?.expect("auth to be called"); let deploy_config = cli_options
.start_dir
.to_deploy_config()?
.expect("auth to be called");
eprintln!( eprintln!(
"{}{}{}", "{}{}{}",

View file

@ -1834,12 +1834,14 @@ impl ConfigFile {
&self, &self,
) -> Result<Option<DeployConfig>, ToInvalidConfigError> { ) -> Result<Option<DeployConfig>, ToInvalidConfigError> {
match &self.json.deploy { match &self.json.deploy {
Some(config) => Ok(Some(serde_json::from_value(config.clone()).map_err(|error| { Some(config) => {
ToInvalidConfigError::Parse { Ok(Some(serde_json::from_value(config.clone()).map_err(
config: "deploy", |error| ToInvalidConfigError::Parse {
source: error, config: "deploy",
} source: error,
})?)), },
)?))
}
None => Ok(None), None => Ok(None),
} }
} }

View file

@ -2000,7 +2000,9 @@ impl WorkspaceDirectory {
}) })
} }
pub fn to_deploy_config(&self) -> Result<Option<DeployConfig>, ToInvalidConfigError> { pub fn to_deploy_config(
&self,
) -> Result<Option<DeployConfig>, ToInvalidConfigError> {
let config = if let Some(deno_json) = self.deno_json.as_ref() { let config = if let Some(deno_json) = self.deno_json.as_ref() {
if let Some(config) = deno_json.member.to_deploy_config()? { if let Some(config) = deno_json.member.to_deploy_config()? {
Some(config) Some(config)