@@ -22,8 +22,8 @@ class EnvironmentDecryptCommand extends Command
22
22
{--key= : The encryption key}
23
23
{--cipher= : The encryption cipher}
24
24
{--env= : The environment to be decrypted}
25
- {--force : Overwrite existing environment file}
26
- {--filename= : Filename to which to write the decrypted contents} ' ;
25
+ {--force : Overwrite the existing environment file}
26
+ {--filename= : Where to write the decrypted file contents} ' ;
27
27
28
28
/**
29
29
* The name of the console command.
@@ -50,6 +50,12 @@ class EnvironmentDecryptCommand extends Command
50
50
*/
51
51
protected $ files ;
52
52
53
+ /**
54
+ * Create a new command instance.
55
+ *
56
+ * @param \Illuminate\Filesystem\Filesystem $files
57
+ * @return void
58
+ */
53
59
public function __construct (Filesystem $ files )
54
60
{
55
61
parent ::__construct ();
@@ -73,12 +79,18 @@ public function handle()
73
79
}
74
80
75
81
$ cipher = $ this ->option ('cipher ' ) ?: 'aes-128-cbc ' ;
82
+
76
83
$ key = $ this ->parseKey ($ key );
84
+
77
85
$ environmentFile = $ this ->option ('env ' )
78
- ? base_path ('.env ' ).'. ' .$ this ->option ('env ' )
79
- : $ this ->laravel ->environmentFilePath ();
86
+ ? base_path ('.env ' ).'. ' .$ this ->option ('env ' )
87
+ : $ this ->laravel ->environmentFilePath ();
88
+
80
89
$ encryptedFile = $ environmentFile .'.encrypted ' ;
81
- $ filename = $ this ->option ('filename ' ) ? base_path ($ this ->option ('filename ' )) : $ environmentFile ;
90
+
91
+ $ filename = $ this ->option ('filename ' )
92
+ ? base_path ($ this ->option ('filename ' ))
93
+ : $ environmentFile ;
82
94
83
95
if (Str::endsWith ($ filename , '.encrypted ' )) {
84
96
$ this ->components ->error ('Invalid filename. ' );
0 commit comments