File tree Expand file tree Collapse file tree 3 files changed +18
-18
lines changed
Expand file tree Collapse file tree 3 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " magic-opener"
3- version = " 0.3.2 "
3+ version = " 0.3.3 "
44edition = " 2024"
55description = " An 'open' replacement that tries to do the right thing."
66readme = " README.md"
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ fn main() {
6161 let remote_path = match GitRepository :: url ( & current_dir, & paths) {
6262 Ok ( url) => url,
6363 Err ( RepositoryError :: NoSuchRemote ( _) ) => {
64- println ! ( "Found a Git repository, but no remote URL is set." ) ;
64+ debug ! ( "Found a Git repository, but no remote URL is set." ) ;
6565 current_dir. clone ( )
6666 }
6767 Err ( e) => {
68- println ! ( "Unknown error while trying to get remote URL: {e}" ) ;
68+ eprintln ! ( "Unknown error while trying to get remote URL: {e}" ) ;
6969 return ;
7070 }
7171 } ;
@@ -114,13 +114,13 @@ fn main() {
114114 return ;
115115 }
116116
117- let mut args = vec ! [ remote_path. as_str ( ) ] ;
118-
119- if remote_path . contains ( "://" ) {
120- args . insert ( 0 , "--background" ) ;
121- }
117+ let args = if remote_path. contains ( "://" ) {
118+ vec ! [ "--background" . to_string ( ) , remote_path ]
119+ } else {
120+ paths
121+ } ;
122122
123- debug ! ( "Opening with args: {:?}" , args ) ;
123+ debug ! ( "Opening with args: {args :?}" ) ;
124124
125125 let _ = Command :: new ( OPEN ) . args ( & args) . exec ( ) ;
126126}
You can’t perform that action at this time.
0 commit comments