@@ -405,6 +405,15 @@ class DockerService implements DockerLibrary {
405405 * @param network the network to start
406406 */
407407 constructSimJson ( network : Network ) {
408+ // Helper function to convert Windows paths to POSIX path format.
409+ const getPosixPath = ( path : string ) => {
410+ // Normalize to POSIX separators for Windows paths.
411+ const norm = path . replace ( / \\ / g, '/' ) ;
412+
413+ const parts = norm . split ( 'volumes/' ) ;
414+
415+ return parts [ parts . length - 1 ] ;
416+ } ;
408417 const simJson : {
409418 nodes : SimulationNodeConfig [ ] ;
410419 activity : ActivityConfig [ ] ;
@@ -439,9 +448,9 @@ class DockerService implements DockerLibrary {
439448 const lnd = node as LndNode ;
440449 simNode = {
441450 id : lnd . name ,
442- macaroon : `/home/simln/.${ lnd . paths . adminMacaroon . split ( 'volumes/' ) . pop ( ) } ` ,
451+ macaroon : `/home/simln/.${ getPosixPath ( lnd . paths . adminMacaroon ) } ` ,
443452 address : `https://host.docker.internal:${ lnd . ports . grpc } ` ,
444- cert : `/home/simln/.${ lnd . paths . tlsCert . split ( 'volumes/' ) . pop ( ) } ` ,
453+ cert : `/home/simln/.${ getPosixPath ( lnd . paths . tlsCert ) } ` ,
445454 } ;
446455 break ;
447456
@@ -460,13 +469,9 @@ class DockerService implements DockerLibrary {
460469 simNode = {
461470 id : cln . name ,
462471 address : `host.docker.internal:${ cln . ports . grpc } ` ,
463- ca_cert : `/home/simln/.${ cln . paths . tlsCert ?. split ( 'volumes/' ) . pop ( ) } ` ,
464- client_cert : `/home/simln/.${ cln . paths . tlsClientCert
465- ?. split ( 'volumes/' )
466- . pop ( ) } `,
467- client_key : `/home/simln/.${ cln . paths . tlsClientKey
468- ?. split ( 'volumes/' )
469- . pop ( ) } `,
472+ ca_cert : `/home/simln/.${ getPosixPath ( cln . paths . tlsCert ! ) } ` ,
473+ client_cert : `/home/simln/.${ getPosixPath ( cln . paths . tlsClientCert ! ) } ` ,
474+ client_key : `/home/simln/.${ getPosixPath ( cln . paths . tlsClientKey ! ) } ` ,
470475 } ;
471476 break ;
472477
@@ -475,10 +480,8 @@ class DockerService implements DockerLibrary {
475480 simNode = {
476481 id : litd . name ,
477482 address : `host.docker.internal:${ litd . ports . grpc } ` ,
478- cert : `/home/simln/.${ litd . paths . tlsCert . split ( 'volumes/' ) . pop ( ) } ` ,
479- macaroon : `/home/simln/.${ litd . paths . adminMacaroon
480- . split ( 'volumes/' )
481- . pop ( ) } `,
483+ cert : `/home/simln/.${ getPosixPath ( litd . paths . tlsCert ) } ` ,
484+ macaroon : `/home/simln/.${ getPosixPath ( litd . paths . adminMacaroon ) } ` ,
482485 } ;
483486 break ;
484487 }
0 commit comments