File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
wp_rs_cli/src/bin/wp_rs_cli Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -418,13 +418,13 @@ async fn resolve_post_id(client: &WpApiClient, args: &FetchPostArgs) -> Result<P
418418 return Ok ( id) ;
419419 }
420420 let Some ( post_url) = & args. url else {
421- return Err ( anyhow ! ( "Either --post-id or --post- url must be provided" ) ) ;
421+ return Err ( anyhow ! ( "Either --post-id or --url must be provided" ) ) ;
422422 } ;
423423
424424 // Strategy: retrieve by slug via posts list API when possible.
425425 // For wp.com, the resolver requires site context; for wp.org, api_root is given.
426426 // We'll try to parse the URL and extract a last path segment as potential slug.
427- let url = Url :: parse ( post_url) . map_err ( |e| anyhow ! ( "Invalid --post- url: {e}" ) ) ?;
427+ let url = Url :: parse ( post_url) . map_err ( |e| anyhow ! ( "Invalid url: {e}" ) ) ?;
428428 let slug_candidate = url
429429 . path_segments ( )
430430 . and_then ( |segs| segs. filter ( |s| !s. is_empty ( ) ) . last ( ) )
@@ -433,7 +433,7 @@ async fn resolve_post_id(client: &WpApiClient, args: &FetchPostArgs) -> Result<P
433433 . to_string ( ) ;
434434
435435 if slug_candidate. is_empty ( ) {
436- return Err ( anyhow ! ( "Could not parse a slug from --post- url" ) ) ;
436+ return Err ( anyhow ! ( "Could not parse a slug from url" ) ) ;
437437 }
438438
439439 // Query posts by slug; returns an array, take first match.
You can’t perform that action at this time.
0 commit comments