File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,12 +150,12 @@ fn find_stdout() -> UResult<File> {
150150 Ok ( t)
151151 }
152152 Err ( e1) => {
153- let Some ( home) = env:: var_os ( "HOME" ) else {
153+ let Ok ( home) = env:: var ( "HOME" ) else {
154154 return Err ( NohupError :: OpenFailed ( internal_failure_code, e1) . into ( ) ) ;
155155 } ;
156156 let mut homeout = PathBuf :: from ( home) ;
157157 homeout. push ( NOHUP_OUT ) ;
158- let homeout_str = homeout. to_string_lossy ( ) ;
158+ let homeout_str = homeout. to_str ( ) . unwrap ( ) ;
159159 match OpenOptions :: new ( ) . create ( true ) . append ( true ) . open ( & homeout) {
160160 Ok ( t) => {
161161 show_error ! (
Original file line number Diff line number Diff line change @@ -247,23 +247,3 @@ fn test_nohup_stderr_to_stdout() {
247247 assert ! ( content. contains( "stdout message" ) ) ;
248248 assert ! ( content. contains( "stderr message" ) ) ;
249249}
250-
251- #[ test]
252- #[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
253- fn test_nohup_non_utf8_home ( ) {
254- use std:: { ffi:: OsStr , os:: unix:: ffi:: OsStrExt } ;
255- let ts = TestScenario :: new ( util_name ! ( ) ) ;
256- let at = & ts. fixtures ;
257-
258- at. mkdir ( "nohup.out" ) ;
259- at. mkdir ( OsStr :: from_bytes ( b"nohup_home\x80 " ) ) ;
260- let path = at. plus ( OsStr :: from_bytes ( b"nohup_home\x80 " ) ) ;
261-
262- ts. ucmd ( )
263- . terminal_simulation ( true )
264- . env ( "HOME" , path. as_os_str ( ) )
265- . args ( & [ "true" ] )
266- . succeeds ( ) ;
267-
268- assert ! ( at. file_exists( path. join( "nohup.out" ) ) ) ;
269- }
You can’t perform that action at this time.
0 commit comments