File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " cli.rs " : patch
3+ " cli.js " : patch
4+ ---
5+
6+ ** Breaking change:** The ` dev ` command now reads the custom config file from CWD instead of the Tauri folder.
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ pub fn command(options: Options) -> Result<()> {
5050 Some ( if config. starts_with ( '{' ) {
5151 config. to_string ( )
5252 } else {
53- std:: fs:: read_to_string ( & config) ?
53+ std:: fs:: read_to_string ( & config) . with_context ( || "failed to read custom configuration" ) ?
5454 } )
5555 } else {
5656 None
Original file line number Diff line number Diff line change @@ -79,16 +79,18 @@ pub fn command(options: Options) -> Result<()> {
7979
8080fn command_internal ( options : Options ) -> Result < ( ) > {
8181 let tauri_path = tauri_dir ( ) ;
82- set_current_dir ( & tauri_path) . with_context ( || "failed to change current working directory" ) ?;
8382 let merge_config = if let Some ( config) = & options. config {
8483 Some ( if config. starts_with ( '{' ) {
8584 config. to_string ( )
8685 } else {
87- std:: fs:: read_to_string ( & config) ?
86+ std:: fs:: read_to_string ( & config) . with_context ( || "failed to read custom configuration" ) ?
8887 } )
8988 } else {
9089 None
9190 } ;
91+
92+ set_current_dir ( & tauri_path) . with_context ( || "failed to change current working directory" ) ?;
93+
9294 let config = get_config ( merge_config. as_deref ( ) ) ?;
9395
9496 if let Some ( before_dev) = & config
You can’t perform that action at this time.
0 commit comments