* lifecycle: fix ak exit status not being passed Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use waitstatus_to_exitcode Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
		
			
				
	
	
		
			19 lines
		
	
	
		
			441 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			441 B
		
	
	
	
		
			Python
		
	
	
	
	
	
"""Wrapper for lifecycle/ak, to be installed by poetry"""
 | 
						|
 | 
						|
from os import system, waitstatus_to_exitcode
 | 
						|
from pathlib import Path
 | 
						|
from sys import argv, exit
 | 
						|
 | 
						|
 | 
						|
def main():
 | 
						|
    """Wrapper around ak bash script"""
 | 
						|
    current_path = Path(__file__)
 | 
						|
    args = " ".join(argv[1:])
 | 
						|
    res = system(f"{current_path.parent}/ak {args}")  # nosec
 | 
						|
    exit_code = waitstatus_to_exitcode(res)
 | 
						|
    exit(exit_code)
 | 
						|
 | 
						|
 | 
						|
if __name__ == "__main__":
 | 
						|
    main()
 |