Skip to content

Commit

Permalink
don't print warning line too long as we support long command lines, u…
Browse files Browse the repository at this point in the history
…se define instead of hard coded env var name
  • Loading branch information
PerditionC committed Jun 6, 2021
1 parent f7005b2 commit 22d8a02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shell/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ void execute(char *first, char *rest, int lh_lf)

if(strlen(rest) > MAX_EXTERNAL_COMMAND_SIZE) {
char *fullcommandline = malloc( strlen( first ) + strlen( rest ) + 2 );
error_line_too_long();
if( fullcommandline == NULL ) return;
sprintf( fullcommandline, "%s%s", first, rest );
if( chgEnv( "CMDLINE", fullcommandline ) != 0 ) {
if( chgEnv( LONG_CMDLINE_ENV_NAME, fullcommandline ) != 0 ) {
free( fullcommandline );
return;
}
Expand Down

0 comments on commit 22d8a02

Please sign in to comment.