fix
This commit is contained in:
		@@ -29,25 +29,27 @@ export default class Copyright implements Snippet {
 | 
				
			|||||||
    if (!this.options)
 | 
					    if (!this.options)
 | 
				
			||||||
      await this.gather_options ();
 | 
					      await this.gather_options ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const options = this.options as CopyrightOptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    await FileMapper.map_all_files (
 | 
					    await FileMapper.map_all_files (
 | 
				
			||||||
      this.cwd,
 | 
					      this.cwd,
 | 
				
			||||||
      this.fix_file_license.bind (this)
 | 
					      this.fix_file_license.bind (this)
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    modify_json ((json) => {
 | 
					    modify_json ((json) => {
 | 
				
			||||||
      json.author = `${this.options.author} <${this.options.email}>`;
 | 
					      json.author = `${options.author} <${options.email}>`;
 | 
				
			||||||
      json.license = this.options.has_license
 | 
					      json.license = options.has_license
 | 
				
			||||||
        ? this.options.license
 | 
					        ? options.license
 | 
				
			||||||
        : 'UNLICENSED';
 | 
					        : 'UNLICENSED';
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (this.options.has_license) {
 | 
					    if (options.has_license) {
 | 
				
			||||||
      await fs.writeFile (
 | 
					      await fs.writeFile (
 | 
				
			||||||
        path.join (cwd, 'LICENSE'),
 | 
					        path.join (cwd, 'LICENSE'),
 | 
				
			||||||
        getLicense (this.options.license, {
 | 
					        getLicense (options.license, {
 | 
				
			||||||
          name:    this.options.author,
 | 
					          name:    options.author,
 | 
				
			||||||
          email:   this.options.email,
 | 
					          email:   options.email,
 | 
				
			||||||
          project: this.options.software
 | 
					          project: options.software
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user