File tree Expand file tree Collapse file tree
src/main/java/org/tron/core/config/args Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ plugins {
33 id " com.gorylenko.gradle-git-properties" version " 2.4.1"
44}
55
6+ gitProperties. failOnNoGitDirectory = false ;
7+
68apply plugin : ' application'
79apply plugin : ' checkstyle'
810
Original file line number Diff line number Diff line change @@ -224,17 +224,23 @@ public static void clearParam() {
224224 */
225225 private static void printVersion () {
226226 Properties properties = new Properties ();
227+ boolean noGitProperties = true ;
227228 try {
228229 InputStream in = Thread .currentThread ()
229230 .getContextClassLoader ().getResourceAsStream ("git.properties" );
230- properties .load (in );
231+ if (in != null ) {
232+ noGitProperties = false ;
233+ properties .load (in );
234+ }
231235 } catch (IOException e ) {
232236 logger .error (e .getMessage ());
233237 }
234238 JCommander .getConsole ().println ("OS : " + System .getProperty ("os.name" ));
235239 JCommander .getConsole ().println ("JVM : " + System .getProperty ("java.vendor" ) + " "
236240 + System .getProperty ("java.version" ) + " " + System .getProperty ("os.arch" ));
237- JCommander .getConsole ().println ("Git : " + properties .getProperty ("git.commit.id" ));
241+ if (!noGitProperties ) {
242+ JCommander .getConsole ().println ("Git : " + properties .getProperty ("git.commit.id" ));
243+ }
238244 JCommander .getConsole ().println ("Version : " + Version .getVersion ());
239245 JCommander .getConsole ().println ("Code : " + Version .VERSION_CODE );
240246 }
You can’t perform that action at this time.
0 commit comments