Skip to content

Commit 82b7c11

Browse files
db3000lstein
authored andcommitted
Forward dream.py to invoke.py using the same interpreter, add deprecation warning
1 parent 94bad85 commit 82b7c11

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

scripts/dream.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#!/usr/bin/env python3
22
# Copyright (c) 2022 Lincoln D. Stein (https://github.com/lstein)
33

4-
import sys
5-
import os.path
6-
7-
script_path = sys.argv[0]
8-
script_args = sys.argv[1:]
9-
script_dir,script_name = os.path.split(script_path)
10-
script_dest = os.path.join(script_dir,'invoke.py')
11-
os.execlp('python3','python3',script_dest,*script_args)
4+
import warnings
5+
import invoke
126

7+
if __name__ == '__main__':
8+
warnings.warn("dream.py is deprecated, please run invoke.py instead",
9+
DeprecationWarning)
10+
invoke.main()

0 commit comments

Comments
 (0)