File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,20 @@ def main_code():
48
48
log .debug (f"config: { config .to_dict ()} " )
49
49
output_handler = OutputHandler (config )
50
50
51
+ # Validate API token
52
+ if not config .api_token :
53
+ log .info ("Socket API Token not found. Please set it using either:\n "
54
+ "1. Command line: --api-token YOUR_TOKEN\n "
55
+ "2. Environment variable: SOCKET_SECURITY_API_KEY" )
56
+ sys .exit (3 )
57
+
51
58
sdk = socketdev (token = config .api_token )
52
59
log .debug ("sdk loaded" )
53
60
54
61
if config .enable_debug :
55
62
set_debug_mode (True )
56
63
log .debug ("Debug logging enabled" )
57
64
58
- # Validate API token
59
- if not config .api_token :
60
- log .info ("Unable to find Socket API Token" )
61
- sys .exit (3 )
62
65
63
66
# Initialize Socket core components
64
67
socket_config = SocketConfig (
You can’t perform that action at this time.
0 commit comments