This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Commit c2a303e 1 parent 9ea258c commit c2a303e Copy full SHA for c2a303e
File tree 2 files changed +22
-20
lines changed
2 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -41,24 +41,4 @@ public function install() {
41
41
return $ status_code ;
42
42
}
43
43
44
- /**
45
- * Writes a hash salt to ${repo.root}/salt.txt if one does not exist.
46
- *
47
- * @return int
48
- * A CLI exit code.
49
- */
50
- protected function hashSalt () {
51
- $ hash_salt_file = $ this ->getConfigValue ('repo.root ' ) . '/salt.txt ' ;
52
- if (!file_exists ($ hash_salt_file )) {
53
- $ this ->say ("Writing hash salt to $ hash_salt_file " );
54
- $ status_code = $ this ->taskWriteToFile ($ hash_salt_file )
55
- ->line (RandomString::string (55 ))
56
- ->run ();
57
-
58
- return $ status_code ;
59
- }
60
-
61
- return 0 ;
62
- }
63
-
64
44
}
Original file line number Diff line number Diff line change @@ -133,4 +133,26 @@ protected function installGitHook($hook) {
133
133
}
134
134
}
135
135
136
+ /**
137
+ * Writes a hash salt to ${repo.root}/salt.txt if one does not exist.
138
+ *
139
+ * @command setup:hash-salt
140
+ *
141
+ * @return int
142
+ * A CLI exit code.
143
+ */
144
+ public function hashSalt () {
145
+ $ hash_salt_file = $ this ->getConfigValue ('repo.root ' ) . '/salt.txt ' ;
146
+ if (!file_exists ($ hash_salt_file )) {
147
+ $ this ->say ("Writing hash salt to $ hash_salt_file " );
148
+ $ result = $ this ->taskWriteToFile ($ hash_salt_file )
149
+ ->line (RandomString::string (55 ))
150
+ ->run ();
151
+
152
+ return $ result ->wasSuccessful ();
153
+ }
154
+
155
+ return TRUE ;
156
+ }
157
+
136
158
}
You can’t perform that action at this time.
0 commit comments