@@ -25,8 +25,6 @@ class _MakeEnvCommand extends NyCustomCommand {
2525 command.addFlag ("help" ,
2626 abbr: "h" ,
2727 help: 'Generates an encrypted env.g.dart file from your .env file' );
28- command.addFlag ("force" ,
29- abbr: "f" , help: "Overwrites existing env.g.dart if present." );
3028 command.addOption ("file" ,
3129 abbr: "e" , help: "The .env file to read from." , defaultValue: ".env" );
3230 command.addFlag ("dart-define" ,
@@ -39,7 +37,6 @@ class _MakeEnvCommand extends NyCustomCommand {
3937 @override
4038 Future <void > handle (CommandResult result) async {
4139 final String envFileName = result.getString ("file" , defaultValue: ".env" )! ;
42- final hasForceFlag = result.hasForceFlag;
4340 final bool ? useDartDefine = result.getBool ("dart-define" );
4441
4542 final envFile = File (envFileName);
@@ -53,13 +50,6 @@ class _MakeEnvCommand extends NyCustomCommand {
5350 return ;
5451 }
5552
56- // Check if output file exists and force flag is not set
57- if (await outputFile.exists () && ! hasForceFlag) {
58- warning ('$outputPath already exists.' );
59- info ('Use --force to overwrite the existing file.' );
60- return ;
61- }
62-
6353 // Parse .env file
6454 final envContent = await envFile.readAsString ();
6555 final envMap = _parseEnvFile (envContent);
0 commit comments