File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -150,21 +150,20 @@ int main(const int argc, const char* const* const argv) {
150150 args.push_back (strdup (" -g" ));
151151 }
152152
153- if (getenv (" SIGN" ) != nullptr ) {
153+ doSomethingWithEnvVar ({" LDAI_SIGN" , " SIGN" }, [&](const auto & value) {
154+ (void ) value;
154155 args.push_back (strdup (" -s" ));
155156
156- const char * signingKey;
157- if ((signingKey = getenv (" SIGN_KEY" )) != nullptr ) {
157+ doSomethingWithEnvVar ({" LDAI_SIGN_KEY" , " SIGN_KEY" }, [&](const auto & signKey) {
158158 args.push_back (strdup (" --sign-key" ));
159- args.push_back (strdup (signingKey ));
160- }
159+ args.push_back (strdup (signKey. c_str () ));
160+ });
161161
162- const char * signingArgs = getenv (" SIGN_ARGS" );
163- if (signingArgs != nullptr ) {
162+ doSomethingWithEnvVar ({" LDAI_SIGN_ARGS" , " SIGN_ARGS" }, [&](const auto & signArgs) {
164163 args.push_back (strdup (" --sign-args" ));
165- args.push_back (strdup (signingArgs ));
166- }
167- }
164+ args.push_back (strdup (signArgs. c_str () ));
165+ });
166+ });
168167
169168 constexpr auto appimagetool_verbose_arg = " -v" ;
170169
You can’t perform that action at this time.
0 commit comments