File tree Expand file tree Collapse file tree
cmd/soroban-cli/src/commands/contract Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,8 +254,22 @@ impl Cmd {
254254 let meta = extract_metadata ( & wasm_bytes) ?;
255255
256256 print. infoln ( format ! ( "Build image: {}" , meta. bldimg) ) ;
257- if let Some ( v) = & meta. source_uri {
258- print. infoln ( format ! ( "Source URI: {v}" ) ) ;
257+ // Report the source we'll actually fetch from. When `--source-uri`
258+ // overrides the recorded value, show the override (and the recorded
259+ // value it replaces) so the line isn't misleading.
260+ match ( & self . source_uri , & meta. source_uri ) {
261+ ( Some ( override_uri) , Some ( recorded) ) => {
262+ print. infoln ( format ! (
263+ "Source URI: {override_uri} (overrides recorded {recorded})"
264+ ) ) ;
265+ }
266+ ( Some ( override_uri) , None ) => {
267+ print. infoln ( format ! ( "Source URI: {override_uri} (override)" ) ) ;
268+ }
269+ ( None , Some ( recorded) ) => {
270+ print. infoln ( format ! ( "Source URI: {recorded}" ) ) ;
271+ }
272+ ( None , None ) => { }
259273 }
260274 if let Some ( v) = & meta. source_sha256 {
261275 print. infoln ( format ! ( "Source SHA-256: {v}" ) ) ;
You can’t perform that action at this time.
0 commit comments