Skip to content

Commit 0d45b03

Browse files
committed
fix init bug
1 parent a6b212c commit 0d45b03

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/warnet/project.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,25 +298,27 @@ def new_internal(directory: Path, from_init=False):
298298
),
299299
]
300300
)
301+
custom_network_path = ""
301302
if proj_answers is None:
302303
click.secho("Setup cancelled by user.", fg="yellow")
303304
return False
304305
if proj_answers["custom_network"]:
305306
click.secho("\nGenerating custom network...", fg="yellow", bold=True)
306307
custom_network_path = inquirer_create_network(directory)
307308

308-
click.echo(
309-
f"\nEdit the network files found in {custom_network_path} before deployment if you want to customise the network."
310-
)
309+
if custom_network_path:
310+
click.echo(
311+
f"\nEdit the network files found in {custom_network_path} before deployment if you want to customise the network."
312+
)
313+
click.echo("\nWhen you're ready, run the following command to deploy this network:")
314+
click.echo(f" warnet deploy {custom_network_path}")
315+
311316
click.echo(
312317
"If you enabled fork-observer you must forward the port from the cluster to your local machine:\n"
313318
"`kubectl port-forward fork-observer 2323`\n"
314319
"fork-observer will then be available at web address: localhost:2323"
315320
)
316321

317-
click.echo("\nWhen you're ready, run the following command to deploy this network:")
318-
click.echo(f" warnet deploy {custom_network_path}")
319-
320322

321323
@click.command()
322324
def init():

0 commit comments

Comments
 (0)