Skip to content

Commit

Permalink
username, password promot
Browse files Browse the repository at this point in the history
  • Loading branch information
exiahuang committed Mar 20, 2020
1 parent e18328d commit 0770b2c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sfdc_cli/commands/project_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
# -*- coding: utf-8 -*-
import os
from sfdc_cli.project import Project
import getpass

command_name = os.path.basename(__file__).split('.', 1)[0].replace("_", ":")


def register(parser, subparsers, **kwargs):

def new_project(args):
if args.projectdir:
if not args.username:
args.username = input("Sfdc Username: ")
if not args.password:
args.password = getpass.getpass('Sfdc Password: ')
Project().init(project_dir=args.projectdir,
username=args.username,
password=args.password,
Expand All @@ -24,12 +30,14 @@ def new_project(args):
parser_project.add_argument('-d',
'--projectdir',
type=str,
help='project dir')
help='project dir',
required=False,
default=".")
parser_project.add_argument('-u',
'--username',
type=str,
help='username',
default="none")
default=None)
parser_project.add_argument('-t',
'--security_token',
type=str,
Expand All @@ -39,7 +47,7 @@ def new_project(args):
'--password',
type=str,
help='password',
default="none")
default=None)
parser_project.add_argument('-s',
'--sourcedir',
type=str,
Expand Down

0 comments on commit 0770b2c

Please sign in to comment.