File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl PackagePublisher for LocalBackend {
140140 let mut out = tokio:: fs:: File :: create ( & path)
141141 . await
142142 . map_err ( |e| registry_path_context ( e, & path) ) ?;
143- println ! ( "writing to {}" , path. display( ) ) ;
143+ tracing :: info !( "publishing to {}" , path. display( ) ) ;
144144 tokio:: io:: copy ( & mut data, & mut out)
145145 . await
146146 . map_err ( Error :: IoError )
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ use std::{
44 path:: { Path , PathBuf } ,
55} ;
66
7- use :: toml:: Value ;
87use serde:: { Deserialize , Serialize } ;
98
109use crate :: {
Original file line number Diff line number Diff line change @@ -273,11 +273,16 @@ impl PublishArgs {
273273 wit:: build_wit_dir ( & self . path , client. clone ( ) , & mut lock_file) . await ?;
274274 // There is no way to check if we are in a git repository unlike `cargo publish --allow-dirty` so
275275 // check against previous values.
276- if lock_file != prev_lock_ref {
276+ if lock_file != prev_lock_ref && ! self . dry_run {
277277 return Err ( anyhow:: anyhow!(
278278 "wkg.lock would be updated during publish, aborting"
279279 ) )
280- . context ( "Run `wkg wit fetch` before attempting to publish" ) ;
280+ . with_context ( || {
281+ format ! (
282+ "Run `wkg wit build {}` before attempting to publish" ,
283+ self . path. to_string_lossy( )
284+ )
285+ } ) ;
281286 }
282287
283288 let tmp = tempfile:: Builder :: new ( )
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ impl BuildArgs {
115115pub async fn build_wit_dir (
116116 dir : impl AsRef < Path > ,
117117 client : CachingClient < FileCache > ,
118- mut lock_file : & mut LockFile ,
118+ lock_file : & mut LockFile ,
119119) -> anyhow:: Result < ( PackageRef , Option < Version > , Vec < u8 > ) > {
120120 check_dir ( & dir) . await ?;
121121 let wkg_config = wasm_pkg_core:: config:: Config :: load ( ) . await ?;
You can’t perform that action at this time.
0 commit comments