Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more spells #2

Open
1 of 2 tasks
gabru-md opened this issue Jul 16, 2017 · 12 comments
Open
1 of 2 tasks

add more spells #2

gabru-md opened this issue Jul 16, 2017 · 12 comments

Comments

@gabru-md
Copy link
Member

gabru-md commented Jul 16, 2017

  • accio for wget
  • add more here
@ghost
Copy link

ghost commented Jul 16, 2017

What if wget isn't installed

@gabru-md
Copy link
Member Author

@Yamboy1

exec(command,function(err,stdout,stderr){
		if(err){
			return console.log(chalk.greenBright('FileError: Some error occured while fetching URL'));
		}
		return console.log(chalk.yellowBright('File Download successful'));
		
});

Here, if err occurs, then you can install wget, simple code will be:

 exec(command,function(err,stdout,stderr){
		if(err){
			console.log(err);
                        exec("sudo apt-get install wget",(error,stdout,stderr){
                                  if(error){console.log(error)}
                                  else{console.log('wget installed successfully');
                        });
		}
                else{
		        return console.log(chalk.yellowBright('File Download successful'));
		}
 });

But since there can be many errors like error with URL parsing and wget not installed error.
so if you have a better code that can differentiate between between these errors then by all means do it and send a pr.

Cheers!

@ghost
Copy link

ghost commented Jul 17, 2017

I'll look into this.

BTW: There is more than one package manager. Debian and Ubuntu use apt, but other distros use rpm, pacman (Yes that is actually a package manager), yum and many more so you would have to account for those.

@ghost
Copy link

ghost commented Jul 17, 2017

@gabru-md Could you assign this issue to me.

@gabru-md
Copy link
Member Author

Issues can only be assingned to collaborators i guess.
You can send a Pull Request with the changes done. If you want to collabirate then please verify your emwil address registered with github and let me know.

Cheers!

@ghost
Copy link

ghost commented Jul 18, 2017

I'm going to add an npm preinstall hook rather than add the code into accio.js

@gabru-md
Copy link
Member Author

sure 👍

@ghost
Copy link

ghost commented Jul 20, 2017

Heres my pull request #4. It still needs some testing.

@ms10398
Copy link
Member

ms10398 commented Oct 25, 2017

@gabru-md can you suggest any spell which I can work upon and add it.

@gabru-md
Copy link
Member Author

@ms10398 have you seen/read harry potter ?
If yes then you can add any spell with a relevant linux command attached to it.
I donot have any in mind as of now. Do you have any ?

@ms10398
Copy link
Member

ms10398 commented Oct 25, 2017

Yes I have seen Harry Potter 😄 !!
I will see all harry potter spells and check if can get a good spell in mind to add it.

@Ananthavijay
Copy link
Contributor

added a spell - nox
PR - #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants